Last active
July 13, 2020 22:26
-
-
Save Tatsh/2565517 to your computer and use it in GitHub Desktop.
nginx configuration for mirroring PHP.net
This file contains hidden or 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 { | |
server_name php.sutralib.com; | |
access_log /var/log/nginx/php.sutralib.com.access_log main; | |
error_log /var/log/nginx/php.sutralib.com.error_log info; | |
root /home/tatsh/dev/php-doc; | |
index index.php; | |
error_page 401 /error.php; | |
error_page 403 /error.php; | |
error_page 404 /error.php; | |
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { | |
add_header Vary "Accept-Encoding"; | |
expires max; | |
tcp_nodelay off; | |
tcp_nopush on; | |
} | |
location = /robots.txt { | |
deny all; | |
log_not_found off; | |
access_log off; | |
} | |
location ~* \.(git|svn|patch|htaccess|log|inc|json|pl|po|sh|ini|sql) { | |
deny all; | |
} | |
location ~ \.php$ { | |
fastcgi_param MIRROR_LANGUAGE "en"; | |
fastcgi_pass 127.0.0.1:9000; | |
include fastcgi.conf; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment