# It is split into several files forming the configuration hierarchy outlined
# below, all located in the /etc/apache2/ directory:
#
# /etc/apache2/
# |-- apache2.conf
# | `-- ports.conf
# |-- mods-enabled
# | |-- *.load
# | `-- *.conf
# |-- conf.d
# | `-- *
# Global configuration
LockFile ${APACHE_LOCK_DIR}/accept.lock
PidFile ${APACHE_PID_FILE}
Timeout 30
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 20
<IfModule mpm_prefork_module>
StartServers 3
MinSpareServers 3
MaxSpareServers 9
ServerLimit 256
MaxClients 20
MaxRequestsPerChild 3000
</IfModule>
<IfModule mpm_worker_module>
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxClients 200
MaxRequestsPerChild 4000
</IfModule>
<IfModule mpm_event_module>
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxClients 200
MaxRequestsPerChild 4000
</IfModule>
# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
#User www-data
#Group www-data
AccessFileName .htaccess
<Files ~ "^\.ht">
Order allow,deny
Deny from all
Satisfy all
</Files>
DefaultType None
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
# Include module configuration:
Include mods-enabled/*.load
Include mods-enabled/*.conf
# Include list of ports to listen on and which to use for name based vhosts
Include ports.conf
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
LogFormat "%b" bytes
Include conf.d/
LoadModule status_module /usr/lib/apache2/modules/mod_status.so
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from all
</Location>
ExtendedStatus On
Module status already enabled
Compiled in modules:
core.c
mod_log_config.c
mod_logio.c
mod_version.c
prefork.c
http_core.c
mod_so.c
Loaded Modules:
core_module (static)
log_config_module (static)
logio_module (static)
version_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
actions_module (shared)
alias_module (shared)
auth_basic_module (shared)
authn_file_module (shared)
authz_default_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgi_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
fcgid_module (shared)
info_module (shared)
mime_module (shared)
negotiation_module (shared)
php5_module (shared)
reqtimeout_module (shared)
rewrite_module (shared)
rpaf_module (shared)
ruid2_module (shared)
setenvif_module (shared)
ssl_module (shared)
status_module (shared)
suexec_module (shared)
Syntax OK
apache_accesses | yes | no [apache server-status not found. check if mod_status is enabled]
apache_processes | yes | no [apache server-status not found. check if mod_status is enabled]
apache_volume | yes | no [apache server-status not found. check if mod_status is enabled]
# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums
<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>
RewriteEngine on
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api$ api/ [L]
RewriteRule ^api/(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
# Images
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]
RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]
# Dispatcher
RewriteCond %{REQUEST_URI} !=/server-status
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
</IfModule>
AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType application/x-font-woff .woff
<IfModule mod_headers.c>
<FilesMatch "\.(ttf|ttc|otf|eot|woff|svg)$">
Header add Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>
#If rewrite mod isn't enabled
ErrorDocument 404 /index.php?controller=404
# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
[Sun Apr 03 06:25:19 2016] [notice] mod_ruid2/0.9.7 enabled
[Sun Apr 03 06:25:19 2016] [notice] Apache/2.2.22 (Debian) mod_fcgid/2.3.6 PHP/5.6.19-1~dotdeb+7.1 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations
[Sun Apr 03 13:52:39 2016] [notice] caught SIGTERM, shutting down
[Sun Apr 03 13:52:39 2016] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Sun Apr 03 13:52:40 2016] [notice] mod_ruid2/0.9.7 enabled
[Sun Apr 03 13:52:40 2016] [notice] Apache/2.2.22 (Debian) mod_fcgid/2.3.6 PHP/5.6.19-1~dotdeb+7.1 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations
[Sun Apr 03 13:54:11 2016] [notice] caught SIGTERM, shutting down
[Sun Apr 03 13:54:12 2016] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Sun Apr 03 13:54:12 2016] [notice] mod_ruid2/0.9.7 enabled
[Sun Apr 03 13:54:12 2016] [notice] Apache/2.2.22 (Debian) mod_fcgid/2.3.6 PHP/5.6.19-1~dotdeb+7.1 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations
[Sun Apr 03 13:54:35 2016] [notice] caught SIGTERM, shutting down
[Sun Apr 03 13:54:36 2016] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Sun Apr 03 13:54:36 2016] [notice] mod_ruid2/0.9.7 enabled
[Sun Apr 03 13:54:37 2016] [notice] Apache/2.2.22 (Debian) mod_fcgid/2.3.6 PHP/5.6.19-1~dotdeb+7.1 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations
[Sun Apr 03 13:54:52 2016] [notice] caught SIGTERM, shutting down
[Sun Apr 03 13:54:53 2016] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Sun Apr 03 13:54:53 2016] [notice] mod_ruid2/0.9.7 enabled
[Sun Apr 03 13:54:53 2016] [notice] Apache/2.2.22 (Debian) mod_fcgid/2.3.6 PHP/5.6.19-1~dotdeb+7.1 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations
[Sun Apr 03 14:00:11 2016] [notice] caught SIGTERM, shutting down
[Sun Apr 03 14:00:12 2016] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Sun Apr 03 14:00:12 2016] [notice] mod_ruid2/0.9.7 enabled
[Sun Apr 03 14:00:12 2016] [notice] Apache/2.2.22 (Debian) mod_fcgid/2.3.6 PHP/5.6.19-1~dotdeb+7.1 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations
[Sun Apr 03 14:04:59 2016] [notice] caught SIGTERM, shutting down
[Sun Apr 03 14:05:00 2016] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Sun Apr 03 14:05:00 2016] [notice] mod_ruid2/0.9.7 enabled
[Sun Apr 03 14:05:00 2016] [notice] Apache/2.2.22 (Debian) mod_fcgid/2.3.6 PHP/5.6.19-1~dotdeb+7.1 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations
[Sun Apr 03 14:07:41 2016] [notice] caught SIGTERM, shutting down
[Sun Apr 03 14:07:42 2016] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Sun Apr 03 14:07:42 2016] [notice] mod_ruid2/0.9.7 enabled
[Sun Apr 03 14:07:42 2016] [notice] Apache/2.2.22 (Debian) mod_fcgid/2.3.6 PHP/5.6.19-1~dotdeb+7.1 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations
[Sun Apr 03 14:08:31 2016] [notice] caught SIGTERM, shutting down
[Sun Apr 03 14:08:32 2016] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Sun Apr 03 14:08:32 2016] [notice] mod_ruid2/0.9.7 enabled
[Sun Apr 03 14:08:32 2016] [notice] Apache/2.2.22 (Debian) mod_fcgid/2.3.6 PHP/5.6.19-1~dotdeb+7.1 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations
[Sun Apr 03 14:10:05 2016] [notice] caught SIGTERM, shutting down
[Sun Apr 03 14:10:06 2016] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Sun Apr 03 14:10:06 2016] [notice] mod_ruid2/0.9.7 enabled
[Sun Apr 03 14:10:06 2016] [notice] Apache/2.2.22 (Debian) mod_fcgid/2.3.6 PHP/5.6.19-1~dotdeb+7.1 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations
[Sun Apr 03 14:10:43 2016] [notice] caught SIGTERM, shutting down
[Sun Apr 03 14:10:44 2016] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Sun Apr 03 14:10:44 2016] [notice] mod_ruid2/0.9.7 enabled
[Sun Apr 03 14:10:44 2016] [notice] Apache/2.2.22 (Debian) mod_fcgid/2.3.6 PHP/5.6.19-1~dotdeb+7.1 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations
[Sun Apr 03 14:11:15 2016] [notice] caught SIGTERM, shutting down
[Sun Apr 03 14:11:16 2016] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Sun Apr 03 14:11:16 2016] [notice] mod_ruid2/0.9.7 enabled
[Sun Apr 03 14:11:16 2016] [notice] Apache/2.2.22 (Debian) mod_fcgid/2.3.6 PHP/5.6.19-1~dotdeb+7.1 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations
[Sun Apr 03 14:12:18 2016] [notice] caught SIGTERM, shutting down
[Sun Apr 03 14:12:19 2016] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Sun Apr 03 14:12:19 2016] [notice] mod_ruid2/0.9.7 enabled
[Sun Apr 03 14:12:19 2016] [notice] Apache/2.2.22 (Debian) mod_fcgid/2.3.6 PHP/5.6.19-1~dotdeb+7.1 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations
[Sun Apr 03 15:33:57 2016] [notice] caught SIGTERM, shutting down
[Sun Apr 03 15:33:58 2016] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Sun Apr 03 15:33:58 2016] [notice] mod_ruid2/0.9.7 enabled
[Sun Apr 03 15:33:58 2016] [notice] Apache/2.2.22 (Debian) mod_fcgid/2.3.6 PHP/5.6.19-1~dotdeb+7.1 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations
[Sun Apr 03 15:36:01 2016] [notice] caught SIGTERM, shutting down
[Sun Apr 03 15:36:02 2016] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Sun Apr 03 15:36:02 2016] [notice] mod_ruid2/0.9.7 enabled
[Sun Apr 03 15:36:02 2016] [notice] Apache/2.2.22 (Debian) mod_fcgid/2.3.6 PHP/5.6.19-1~dotdeb+7.1 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations
[Sun Apr 03 15:50:42 2016] [notice] caught SIGTERM, shutting down
[Sun Apr 03 15:50:43 2016] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Sun Apr 03 15:50:43 2016] [notice] mod_ruid2/0.9.7 enabled
[Sun Apr 03 15:50:43 2016] [notice] Apache/2.2.22 (Debian) mod_fcgid/2.3.6 PHP/5.6.19-1~dotdeb+7.1 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations
2016/04/03 15:50:46 [error] 1545#0: *28688 upstream prematurely closed connection while reading response header from upstream, client: 80.252.154.96, server: _, request: "GET /server-status HTTP/1.1", upstream: "http://XXX.XX.XXX.XX:8080/server-status", host: "XXX.XX.XXX.XX"
2016/04/03 15:50:48 [error] 1545#0: *28688 upstream prematurely closed connection while reading response header from upstream, client: 80.252.154.96, server: _, request: "GET /server-status HTTP/1.1", upstream: "http://XXX.XX.XXX.XX:8080/server-status", host: "XXX.XX.XXX.XX"
2016/04/03 15:50:52 [error] 1545#0: *28688 upstream prematurely closed connection while reading response header from upstream, client: 80.252.154.96, server: _, request: "GET /server-status HTTP/1.1", upstream: "http://XXX.XX.XXX.XX:8080/server-status", host: "XXX.XX.XXX.XX"
2016/04/03 15:50:57 [error] 1545#0: *28688 upstream prematurely closed connection while reading response header from upstream, client: 80.252.154.96, server: _, request: "GET /server-status HTTP/1.1", upstream: "http://XXX.XX.XXX.XX:8080/server-status", host: "XXX.XX.XXX.XX"
2016/04/03 15:55:04 [error] 1545#0: *28715 open() "/etc/nginx/html/server-status" failed (2: No such file or directory), client: 127.0.0.1, server: , request: "GET /server-status?auto HTTP/1.1", host: "127.0.0.1:80"
2016/04/03 15:55:04 [error] 1545#0: *28715 open() "/etc/nginx/html/error/404.html" failed (2: No such file or directory), client: 127.0.0.1, server: , request: "GET /server-status?auto HTTP/1.1", host: "127.0.0.1:80"
2016/04/03 15:55:07 [error] 1545#0: *28716 open() "/etc/nginx/html/server-status" failed (2: No such file or directory), client: 127.0.0.1, server: , request: "GET /server-status?auto HTTP/1.1", host: "127.0.0.1:80"
2016/04/03 15:55:07 [error] 1545#0: *28716 open() "/etc/nginx/html/error/404.html" failed (2: No such file or directory), client: 127.0.0.1, server: , request: "GET /server-status?auto HTTP/1.1", host: "127.0.0.1:80"
2016/04/03 15:55:08 [error] 1545#0: *28717 open() "/etc/nginx/html/server-status" failed (2: No such file or directory), client: 127.0.0.1, server: , request: "GET /server-status?auto HTTP/1.1", host: "127.0.0.1:80"
2016/04/03 15:55:08 [error] 1545#0: *28717 open() "/etc/nginx/html/error/404.html" failed (2: No such file or directory), client: 127.0.0.1, server: , request: "GET /server-status?auto HTTP/1.1", host: "127.0.0.1:80"
2016/04/03 16:00:04 [error] 1545#0: *28734 open() "/etc/nginx/html/server-status" failed (2: No such file or directory), client: 127.0.0.1, server: , request: "GET /server-status?auto HTTP/1.1", host: "127.0.0.1:80"
2016/04/03 16:00:04 [error] 1545#0: *28734 open() "/etc/nginx/html/error/404.html" failed (2: No such file or directory), client: 127.0.0.1, server: , request: "GET /server-status?auto HTTP/1.1", host: "127.0.0.1:80"
2016/04/03 16:00:08 [error] 1545#0: *28735 open() "/etc/nginx/html/server-status" failed (2: No such file or directory), client: 127.0.0.1, server: , request: "GET /server-status?auto HTTP/1.1", host: "127.0.0.1:80"
2016/04/03 16:00:08 [error] 1545#0: *28735 open() "/etc/nginx/html/error/404.html" failed (2: No such file or directory), client: 127.0.0.1, server: , request: "GET /server-status?auto HTTP/1.1", host: "127.0.0.1:80"
2016/04/03 16:00:09 [error] 1545#0: *28736 open() "/etc/nginx/html/server-status" failed (2: No such file or directory), client: 127.0.0.1, server: , request: "GET /server-status?auto HTTP/1.1", host: "127.0.0.1:80"
2016/04/03 16:00:09 [error] 1545#0: *28736 open() "/etc/nginx/html/error/404.html" failed (2: No such file or directory), client: 127.0.0.1, server: , request: "GET /server-status?auto HTTP/1.1", host: "127.0.0.1:80"
2016/04/03 16:05:04 [error] 1545#0: *28753 open() "/etc/nginx/html/server-status" failed (2: No such file or directory), client: 127.0.0.1, server: , request: "GET /server-status?auto HTTP/1.1", host: "127.0.0.1:80"
2016/04/03 16:05:04 [error] 1545#0: *28753 open() "/etc/nginx/html/error/404.html" failed (2: No such file or directory), client: 127.0.0.1, server: , request: "GET /server-status?auto HTTP/1.1", host: "127.0.0.1:80"
2016/04/03 16:05:07 [error] 1545#0: *28754 open() "/etc/nginx/html/server-status" failed (2: No such file or directory), client: 127.0.0.1, server: , request: "GET /server-status?auto HTTP/1.1", host: "127.0.0.1:80"
2016/04/03 16:05:07 [error] 1545#0: *28754 open() "/etc/nginx/html/error/404.html" failed (2: No such file or directory), client: 127.0.0.1, server: , request: "GET /server-status?auto HTTP/1.1", host: "127.0.0.1:80"
2016/04/03 16:05:08 [error] 1545#0: *28755 open() "/etc/nginx/html/server-status" failed (2: No such file or directory), client: 127.0.0.1, server: , request: "GET /server-status?auto HTTP/1.1", host: "127.0.0.1:80"
2016/04/03 16:05:08 [error] 1545#0: *28755 open() "/etc/nginx/html/error/404.html" failed (2: No such file or directory), client: 127.0.0.1, server: , request: "GET /server-status?auto HTTP/1.1", host: "127.0.0.1:80"
proxy_pass http://127.0.0.1:8080/
# Server globals
user www-data;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
# Worker config
events {
worker_connections 1024;
use epoll;
}
http {
# Main settings
sendfile on;
tcp_nopush on;
tcp_nodelay on;
client_header_timeout 1m;
client_body_timeout 1m;
client_header_buffer_size 2k;
client_body_buffer_size 256k;
client_max_body_size 100m;
large_client_header_buffers 4 8k;
send_timeout 30;
keepalive_timeout 60 60;
reset_timedout_connection on;
server_tokens off;
server_name_in_redirect off;
server_names_hash_max_size 512;
server_names_hash_bucket_size 512;
# Log format
log_format main '$remote_addr - $remote_user [$time_local] $request '
'"$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
log_format bytes '$body_bytes_sent';
#access_log /var/log/nginx/access.log main;
access_log off;
# Mime settings
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Compression
gzip on;
gzip_comp_level 9;
gzip_min_length 1000;
gzip_buffers 8 64k;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript image/svg+xml;
gzip_proxied any;
# Proxy settings
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_header Set-Cookie;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffers 32 4k;
# Cloudflare https://www.cloudflare.com/ips
set_real_ip_from 199.27.128.0/21;
set_real_ip_from 173.245.48.0/20;
set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 103.31.4.0/22;
set_real_ip_from 141.101.64.0/18;
set_real_ip_from 108.162.192.0/18;
set_real_ip_from 190.93.240.0/20;
set_real_ip_from 188.114.96.0/20;
set_real_ip_from 197.234.240.0/22;
set_real_ip_from 198.41.128.0/17;
set_real_ip_from 162.158.0.0/15;
set_real_ip_from 104.16.0.0/12;
set_real_ip_from 172.64.0.0/13;
#set_real_ip_from 2400:cb00::/32;
#set_real_ip_from 2606:4700::/32;
#set_real_ip_from 2803:f800::/32;
#set_real_ip_from 2405:b500::/32;
#set_real_ip_from 2405:8100::/32;
real_ip_header CF-Connecting-IP;
# SSL PCI Compliance
ssl_session_cache shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
# Error pages
error_page 403 /error/403.html;
error_page 404 /error/404.html;
error_page 502 503 504 /error/50x.html;
# Cache
proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=512m;
proxy_cache_key "$host$request_uri $cookie_user";
proxy_temp_path /var/cache/nginx/temp;
proxy_ignore_headers Expires Cache-Control;
proxy_cache_use_stale error timeout invalid_header http_502;
proxy_cache_valid any 3d;
map $http_cookie $no_cache {
default 0;
~SESS 1;
~wordpress_logged_in 1;
}
# Wildcard include
include /etc/nginx/conf.d/*.conf;
server {
location /server-status {
proxy_pass http://127.0.0.1:8080/;
}
location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
expires max;
}
}
}
curl http://127.0.0.1:8080/server-status?auto
server {
listen 127.0.0.1:80;
location /server-status {
proxy_pass http://127.0.0.1:8081;
}
}
Listen 127.0.0.1:8081
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from all
</Location>
ExtendedStatus On