Last active
August 29, 2015 14:17
-
-
Save asaokamei/1ed73ab9779f51e7ee72 to your computer and use it in GitHub Desktop.
config for nginx/php.
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
apt-get install php5-fpm nginx php5-xdebug php5-dev |
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
# You may add here your | |
# server { | |
# ... | |
# } | |
# statements for each of your virtual hosts to this file | |
# another virtual host using mix of IP-, name-, and port-based configuration | |
# | |
server { | |
listen 8080; | |
server_name tuum.localhost; | |
#index index.php index.html index.htm; | |
error_log /var/log/nginx/error.log; | |
access_log /var/log/nginx/access.log; | |
location / { | |
root /var/works/tuum/public; | |
try_files $uri /index.php?$args; | |
} | |
location ~ \.php$ { | |
root /var/works/tuum/public; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
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