Created
January 31, 2014 12:54
-
-
Save rolandboon/8731623 to your computer and use it in GitHub Desktop.
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 { | |
server_name pgadmin.example.com; # Make sure to create a DNS record that refers to your droplet | |
root /home/deploy/phppgadmin; | |
allow 123.123.123.123; # Limit access based on IP | |
deny all; | |
location / { | |
index index.php; | |
try_files $uri $uri/ /index.php; # http://wiki.nginx.org/Pitfalls#Check_IF_File_Exists | |
} | |
location ~ \.php$ { | |
try_files $uri =404; # http://wiki.nginx.org/Pitfalls#Passing_Uncontrolled_Requests_to_PHP | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # http://wiki.nginx.org/Pitfalls#FastCGI_Path_in_Script_Filename | |
include /etc/nginx/fastcgi_params; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment