29 lines
936 B
Markdown
29 lines
936 B
Markdown
**Setup Nginx**
|
|
|
|
First, lets add a symbolic link to the directory where you intend to place all your web files in.
|
|
|
|
```
|
|
sudo ln -s /usr/share/phppgadmin /var/www
|
|
```
|
|
|
|
Next, lets create a server block for phpPgAdmin. Create a file /etc/nginx/sites-available/phppgadmin with the following contents.
|
|
|
|
```
|
|
# Server block for phppgadmin service
|
|
server{
|
|
server_name phppgadmin.example.com;
|
|
root /var/www/phppgadmin;
|
|
|
|
access_log /var/log/phppgadmin/access.log;
|
|
error_log /var/log/phppgadmin/error.log;
|
|
|
|
location ~ \.php$ {
|
|
try_files $uri =404;
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
|
fastcgi_index index.php;
|
|
fastcgi_param SCRIPT_FILENAME /path/to/your/www/postgres$fastcgi_script_name;
|
|
include /etc/nginx/fastcgi_params;
|
|
}
|
|
}
|
|
``` |