96 lines
2.6 KiB
Nginx Configuration File
96 lines
2.6 KiB
Nginx Configuration File
|
user root root;
|
||
|
worker_processes 1;
|
||
|
|
||
|
|
||
|
|
||
|
events {
|
||
|
worker_connections 1024;
|
||
|
}
|
||
|
|
||
|
|
||
|
http {
|
||
|
include mime.types;
|
||
|
index index.php index.html index.htm;
|
||
|
default_type text/html;
|
||
|
|
||
|
sendfile on;
|
||
|
keepalive_timeout 65;
|
||
|
gzip on;
|
||
|
|
||
|
gzip_min_length 1k;
|
||
|
gzip_buffers 4 16k;
|
||
|
gzip_http_version 1.0;
|
||
|
gzip_comp_level 2;
|
||
|
gzip_types text/plain application/x-javascript text/css application/xml;
|
||
|
gzip_vary on;
|
||
|
server {
|
||
|
listen 80; # Port, make sure it is not in conflict with another http daemon.
|
||
|
server_name www; # Change this, reference -> http://nginx.org/en/docs/http/server_names.html
|
||
|
error_page 404 =200 /index.php;
|
||
|
error_log /dev/null;
|
||
|
access_log /dev/null;
|
||
|
fastcgi_connect_timeout 300;
|
||
|
fastcgi_send_timeout 300;
|
||
|
fastcgi_read_timeout 300;
|
||
|
fastcgi_buffer_size 32k;
|
||
|
fastcgi_buffers 4 32k;
|
||
|
fastcgi_busy_buffers_size 32k;
|
||
|
fastcgi_temp_file_write_size 32k;
|
||
|
client_body_timeout 10;
|
||
|
client_header_timeout 10;
|
||
|
send_timeout 60; # 60 sec should be enough, if experiencing alof of timeouts, increase this.
|
||
|
output_buffers 1 32k;
|
||
|
postpone_output 1460;
|
||
|
|
||
|
root /www/; # Your document root, where all public material is.
|
||
|
|
||
|
location ~ \.php$ {
|
||
|
fastcgi_index index.php;
|
||
|
include fastcgi_params;
|
||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||
|
|
||
|
if (-f $request_filename) {
|
||
|
# Only throw it at PHP-FPM if the file exists (prevents some PHP exploits)
|
||
|
fastcgi_pass unix:/var/run/php5-fpm.sock; # The upstream determined above
|
||
|
}
|
||
|
}
|
||
|
error_page 404 =200 /index.php;
|
||
|
}
|
||
|
|
||
|
|
||
|
server {
|
||
|
listen 1471;
|
||
|
server_name pineapple; # Change this, reference -> http://nginx.org/en/docs/http/server_names.html
|
||
|
error_page 404 =200 /index.php;
|
||
|
error_log /dev/null;
|
||
|
access_log /dev/null;
|
||
|
fastcgi_connect_timeout 300;
|
||
|
fastcgi_send_timeout 300;
|
||
|
fastcgi_read_timeout 300;
|
||
|
fastcgi_buffer_size 32k;
|
||
|
fastcgi_buffers 4 32k;
|
||
|
fastcgi_busy_buffers_size 32k;
|
||
|
fastcgi_temp_file_write_size 32k;
|
||
|
client_body_timeout 10;
|
||
|
client_header_timeout 10;
|
||
|
send_timeout 60; # 60 sec should be enough, if experiencing alof of timeouts, increase this.
|
||
|
output_buffers 1 32k;
|
||
|
postpone_output 1460;
|
||
|
|
||
|
root /pineapple/; # Your document root, where all public material is.
|
||
|
add_header 'Cache-Control' 'no-cache, no-store, must-revalidate';
|
||
|
|
||
|
location ~ \.php$ {
|
||
|
fastcgi_index index.php;
|
||
|
include fastcgi_params;
|
||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||
|
|
||
|
if (-f $request_filename) {
|
||
|
# Only throw it at PHP-FPM if the file exists (prevents some PHP exploits)
|
||
|
fastcgi_pass unix:/var/run/php5-fpm.sock; # The upstream determined above
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|