Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80 default_server;
- listen [::]:80 default_server;
- # SSL configuration
- #
- # listen 443 ssl default_server;
- # listen [::]:443 ssl default_server;
- #
- # Self signed certs generated by the ssl-cert package
- # Don't use them in a production server!
- #
- # include snippets/snakeoil.conf;
- root /var/www/html/johndoe;
- autoindex on;
- # Add index.php to the list if you are using PHP
- # Don't use them in a production server!
- index index.php;
- server_name johdoe.id;
- location / {
- # First attempt to serve request as file, then
- # as directory, then fall back to displaying a 404.
- #try_files $uri $uri/ =404;
- try_files $uri $uri/ /index.php;
- }
- # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
- #
- location ^~ /subproject/ {
- root /var/www/html/johndoe/subproject;
- index index.php;
- }
- location ~ \.php$ {
- # include snippets/fastcgi-php.conf;
- #
- # # With php5-cgi alone:
- # fastcgi_pass 127.0.0.1:9000;
- # # With php5-fpm:
- # fastcgi_pass unix:/var/run/php5-fpm.sock;
- try_files $uri =404;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- fastcgi_pass unix:/var/run/php5-fpm.sock;
- fastcgi_index index.php;
- }
- # deny access to .htaccess files, if Apache's document root
- # concurs with nginx's one
- #
- location ~ /\.ht {
- deny all;
- }
- }
Add Comment
Please, Sign In to add comment