-
-
Save boywhoroared/1172b8ef60b4d218898a to your computer and use it in GitHub Desktop.
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 { | |
| index index.php; | |
| set $basepath "/var/www"; | |
| set $domain $host; | |
| if ($domain ~ "^(.[^.]*)\.dev$") { | |
| set $domain $1; | |
| set $rootpath "${domain}"; | |
| set $servername "${domain}.dev"; | |
| } | |
| if ($domain ~ "^(.*)\.(.[^.]*)\.dev$") { | |
| set $subdomain $1; | |
| set $domain $2; | |
| set $rootpath "${domain}/${subdomain}/www/"; | |
| set $servername "${subdomain}.${domain}.dev"; | |
| } | |
| server_name $servername; | |
| root $basepath/$rootpath; | |
| location / { | |
| try_files $uri $uri/ /index.php?$args; | |
| } | |
| location ~ \.php$ { | |
| try_files $uri =404; | |
| fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
| fastcgi_pass unix:/var/run/php5-fpm.sock; | |
| fastcgi_index index.php; | |
| include fastcgi_params; | |
| } | |
| location ~ /\.ht { | |
| deny all; | |
| } | |
| location ~ /\.git { | |
| deny all; | |
| } | |
| } |
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 { | |
| root /var/www; | |
| index index.php; | |
| location / { | |
| try_files $uri $uri/ /index.php; | |
| } | |
| location ~ \.php$ { | |
| try_files $uri =404; | |
| fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
| fastcgi_pass unix:/var/run/php5-fpm.sock; | |
| fastcgi_index index.php; | |
| include fastcgi_params; | |
| } | |
| location ~ /\.ht { | |
| deny all; | |
| } | |
| location ~ /\.git { | |
| deny all; | |
| } | |
| location /phpmyadmin { | |
| root /usr/share/; | |
| index index.php; | |
| location ~ ^/phpmyadmin/(.+\.php)$ { | |
| try_files $uri =404; | |
| root /usr/share/; | |
| fastcgi_pass unix:/var/run/php5-fpm.sock; | |
| fastcgi_index index.php; | |
| fastcgi_param SCRIPT_FILENAME $request_filename; | |
| include fastcgi_params; | |
| fastcgi_param PATH_INFO $fastcgi_script_name; | |
| fastcgi_buffer_size 128k; | |
| fastcgi_buffers 256 4k; | |
| fastcgi_busy_buffers_size 256k; | |
| fastcgi_temp_file_write_size 256k; | |
| fastcgi_intercept_errors on; | |
| } | |
| location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { | |
| root /usr/share/; | |
| } | |
| } | |
| location /phpMyAdmin { | |
| rewrite ^/* /phpmyadmin last; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment