Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Fri Dec 15, 2017 1:25 am


News News of Apache, Nginx, Lighttpd and other web server software

Site map of Apache, Nginx, Lighttpd and other web server software » Forum : Apache, Nginx, Lighttpd and other web server software

This forum is dedicated to Apache, Nginx, Lighttpd, Squid and other HTTP transport protocol related software

 [ Total topics 26 Go to page 1, 2, 3

Message
 Post subject: NGINX: 413 Request Entity Too Large
PostPosted: Thu Sep 14, 2017 4:48 am 
Edit nginx.conf or vhost configuration file and modify or add following line adjusting the desired size.:

Code:
...
      # Upload maximum size
      client_max_body_size 15M;
...


If your site is most probably using PHP, nginx also needs to set the following php parameter:

Code:
...
        location ~\.php($|/) {
                fastcgi_param PHP_VALUE "post_max_size=15M \n upload_max_filesize=15M ";
...

Read more : NGINX: 413 Request Entity Too Large | Views : 92 | Replies : 0

Top
 Post subject: Nginx: How to list virtual hosts
PostPosted: Mon Feb 23, 2015 5:05 pm 
Unlike Apache (see https://forum.ivorde.com/apache-how-to-list-virtual-hosts-that-are-currently-configured-on-my-apache-server-t53.html), nginx does not have, at the time of this writing, a builtin option to list configured virtual hosts, so in order to lists vhosts in Nginx web server, all nginx configuration files should be checked for the key "server_name" that are not commented (lines begin with #).

How to list virtual hosts configured in NGINX



root@ubuntu-vpsie:~# find /etc/nginx/ -type f -name "*.conf" -print0 | xargs -0 egrep '^(\s|\t)*server_name'
/etc/nginx/conf.d/server1.conf: server_name ...

Read more : Nginx: How to list virtual hosts | Views : 9477 | Replies : 0

Top
 Post subject: NGINX: How to redirect http to https website
PostPosted: Mon Feb 09, 2015 3:27 pm 
It is a good practice to run a website purely on https and not http for obvious reason. If both http and https services are configured to run properly, first step to take is to redirect http to https within nginx configuration. For this, there are two "server" section, one for each http(s) service.

How to redirect http to https service in nginx configuration permanently - HTTP 301 status code:


server {
server_name server.ivorde.ro;
listen ...

Read more : NGINX: How to redirect http to https website | Views : 1940 | Replies : 0

Top
 Post subject: NGINX: how to set the default virtual host
PostPosted: Thu Dec 12, 2013 6:01 am 
NGINX uses "listen" and "server_name" directives to define a virtual host. A web server virtual host denotes the part in the configuration that specifies what domain to serve based on the "Host:" attribute in the HTTP/1.1 request header sent by the client (browser).

In some cases, NGINX receives requests on the IP address that it listens for domains that it does not host or the IP address. To serve all these requests from a default ...

Read more : NGINX: how to set the default virtual host | Views : 872 | Replies : 0

Top
 Post subject: php 5.4 Cannot load module 'memcached' because required module 'igbinary' is not loaded in Unknown
PostPosted: Wed Dec 11, 2013 11:10 am 
Code:
[11-Dec-2013 14:28:49] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/igbinary.so' - /usr/local/lib/php/20100525/igbinary.so: Undefined symbol "ps_globals" in Unknown on line 0
[11-Dec-2013 14:28:49] NOTICE: PHP message: PHP Warning:  Cannot load module 'memcached' because required module 'igbinary' is not loaded in Unknown on line 0


It's a known thing that php extensions load order is important. Thus, the session extension has to be one of the first to be loaded (as per ...

Read more : php 5.4 Cannot load module 'memcached' because required module 'igbinary' is not loaded in Unknown | Views : 1314 | Replies : 0

Top
 Post subject: php gmagick No decode delegate for this image format JPG
PostPosted: Wed Aug 28, 2013 4:39 am 
After installing php gmagick module and graphicks magick utility using ./configure --enable-shared configure options, I ran into following php(I thought) error when trying to use graphicks magick to alter a JPG image:
Code:
No decode delegate for this image format (./imgs/_DSC2900.JPG)


This is because graphics magick ./configure --help does not show that you need to explicitly enable jpeg format support:
# ./configure --help 2>&1 | grep -iE "jpg|jpeg"
--without-jpeg disable JPEG support
--without-jp2 disable JPEG v2 ...

Read more : php gmagick No decode delegate for this image format JPG | Views : 2133 | Replies : 0

Top
 Post subject: Nginx + php-fpm increase upload_max_filesize and other php values per vhost
PostPosted: Mon Jan 02, 2012 9:04 am 
Recent version of PHP support the PHP_VALUE command for fcgi processes. This means that php ini directives can be configured for each Nginx virtual host individually.
The trick is that multiple values need to be set in one "fastcgi_param PHP_VALUE" directive with a newline character as separator otherwise only the last one will be used by the php process.







Configure php upload_max_filesize from nginx fastcgi parameters


The upload_max_filesize php ini configuration sets the maximum size ...

Read more : Nginx + php-fpm increase upload_max_filesize and other php values per vhost | Views : 5335 | Replies : 0

Top
 Post subject: Apache - Restricting "Server" information in HTTP response header with ServerTokens
PostPosted: Thu Nov 10, 2011 6:39 am 
Apache - how to strip down the "Server" field in HTTP response header with ServerTokens

By default, the apache webserver may provide too detailed info in the http response header for your needs. Example:

Code:
HTTP/1.1 404 Not Found
Date: Thu, 10 Nov 2011 10:35:52 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 202
Connection: close
Content-Type: text/html; charset=iso-8859-1


Stripping down the "Server" field in the http response can be done in ...

Read more : Apache - Restricting "Server" information in HTTP response header with ServerTokens | Views : 768 | Replies : 0

Top
 Post subject: Apache to Nginx Server parameters translation with php function
PostPosted: Thu Aug 26, 2010 7:47 am 
When ran as Apache module, PHP will get $_SERVER variables in the form that they come in the request:
Content-Type, Content-Length, X-File-Size, X-File-Name and so on.


When ran as PHP-FPM with NGINX, php will see the $_SERVER variables in a totally different way (this is because of the default passing of server parameters to fcgi scripts in nginx).

Here's how $_SERVER variables will be seen by php when ran as php-fpm:
Array ( [USER] => ...

Read more : Apache to Nginx Server parameters translation with php function | Views : 60044 | Replies : 0

Top
 Post subject: How to test deflate/gzip compression on a HTTPS (HTTP over SSL) Apache server
PostPosted: Tue Aug 03, 2010 3:30 am 
To test a server for deflate/gzip compression, it needs to be notified that you, as a client (browser) accept compressed encoding.

This is done, by adding an "Accept-Encoding: compress, gzip" in the header of the request.

Testing an https Apache server for deflate/gzip compression, initiating a connection using openssl client
$ openssl s_client -connect 192.168.1.1:443
...Some output about ssl certificate and ssl protocol and cipher used....
GET / HTTP/1.1
Host: test.server.ro
Accept-Encoding: compress, gzip -->press ...

Read more : How to test deflate/gzip compression on a HTTPS (HTTP over SSL) Apache server | Views : 2960 | Replies : 0

Top
 [ Total topics 26 Go to page 1, 2, 3


Last 10 active topics


Shell Scripting and Programming

No new posts BASH shell script to mointor a directory and move file without overwriting destination
View the latest post
No new posts FreeBSD: Install python package manager (pip)
View the latest post
No new posts Shell scripting
View the latest post

OpenLDAP - Lightweight Directory Access Protocol

No new posts Synchronize OpenLDAP and Microsoft Active Directory
View the latest post

Routing and dynamic routing protocols

No new posts BGP Notification Message (3), length: 21, OPEN Message Error (2), subcode Authentication Failure
View the latest post
No new posts JUNOS BGP: How to drain a BGP peering router gracefully without bgp session reset
View the latest post

TCP/IP Networking

No new posts Problem pinging and using server with mobile hotspot
View the latest post

Memory, Storage, Backup and Filesystems

No new posts FreeBSD: List disk drives and re-scan after adding hot-add disk (in virtual environments)
View the latest post

Apache, Nginx, Lighttpd and other web server software

No new posts NGINX: 413 Request Entity Too Large
View the latest post

System administration

No new posts MAC OS X: read image/jpeg EXIF information on command line
View the latest post

Login

Username:   Password:   Log me on automatically each visit  

Statistics

Statistics

Total posts 612 | Total topics 982 | Total members 1192



News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO