-
-
Save Great-Antique/9230151 to your computer and use it in GitHub Desktop.
Nginx configuration for web application powered by Nette framework
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Please paste to folder common/common.conf | |
index index.html index.htm; | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root html; | |
} | |
#location ~ \.(js|ico|gif|jpg|png|css|rar|zip|tar\.gz)$ { } | |
location ~ /\.(ht|gitignore) { # deny access to .htaccess files, if Apache's document root concurs with nginx's one | |
deny all; | |
} | |
location ~ \.(neon|ini|log|yml)$ { # deny access to configuration files | |
deny all; | |
} | |
location = /robots.txt { access_log off; log_not_found off; } | |
location = /humans.txt { access_log off; log_not_found off; } | |
location = /favicon.ico { access_log off; log_not_found off; } | |
proxy_buffer_size 128k; | |
proxy_buffers 4 256k; | |
proxy_busy_buffers_size 256k; | |
fastcgi_buffers 8 16k; fastcgi_buffer_size 32k; | |
client_max_body_size 45M; | |
client_body_buffer_size 128k; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Please paste to folder common/nette.conf | |
try_files $uri $uri/ /index.php?$args; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name nette.dev; | |
charset utf-8; | |
root /home/user/www/nette/sandbox/www; | |
error_log /var/log/php/nette.error.log; | |
access_log /var/log/php/nette.access.log; | |
include common/common.conf; | |
include common/php.conf; | |
include common/nette.conf; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Please paste to folder common/php.conf | |
index index.php index.html index.htm; | |
location ~ \.php$ { | |
fastcgi_send_timeout 1800; | |
fastcgi_read_timeout 1800; | |
fastcgi_connect_timeout 1800; | |
#fastcgi_pass 127.0.0.1:9000; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment