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

FAQ
It is currently Wed Jun 28, 2017 2:33 pm


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 25 Go to page 1, 2, 3

Message
 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 : 8575 | 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 : 1522 | 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 : 639 | 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 : 911 | 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 : 1778 | 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 : 4737 | 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 : 622 | 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 : 56824 | 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 : 2573 | Replies : 0

Top
 Post subject: Pcfg_openfile: unable to check htaccess file, ensure it is readable
PostPosted: Sat May 22, 2010 6:14 pm 
While playing with permisions i got the following errors in the error_log of Apache 2 with mod_rewrite enabled.

[Mon May 24 01:10:31 2010] [crit] [client X.X.X.X] (13)Permission denied: /home/www/domain.tld/img/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[Mon May 24 01:10:58 2010] [crit] [client X.X.X.X] (13)Permission denied: /home/www/domain.tld/img/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[Mon May 24 01:11:04 2010] [crit] [client X.X.X.X] (13)Permission denied: /home/www/domain.tld/img/.htaccess pcfg_openfile: unable to check ...

Read more : Pcfg_openfile: unable to check htaccess file, ensure it is readable | Views : 708 | Replies : 0

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


Last 10 active topics


Virtualization

No new posts SSH Login to Vmware ESXi with ssh keys
View the latest post
No new posts How to retrieve Vmware ESXi license from ssh shell command line
View the latest post

Shell Scripting and Programming

No new posts How to use $variable in conditional sentences?
View the latest post
No new posts Scan IP range using nmap
View the latest post
No new posts Password generator with user inputs bash script
View the latest post

TCP/IP Networking

No new posts TCP ack after two packets
View the latest post

Junos Tips & Tricks

No new posts MTR / My traceroute in Junos
View the latest post

VPS Hosting & Security

No new posts Host a gmod server on a vps or shared host?
View the latest post

Juniper virtual MX (vMX)

No new posts Juniper Virtual MX (vMX) 14.2R5.3 Phase 2 (RE and MPC on different VMs)
View the latest post

OpenLDAP - Lightweight Directory Access Protocol

No new posts cannot login in linux system with ldap user after changing the ldap user password
View the latest post

Login

Username:   Password:   Log me on automatically each visit  

Statistics

Statistics

Total posts 600 | Total topics 969 | Total members 1193



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