Skip to content

Instantly share code, notes, and snippets.

@nodegin
Created September 14, 2016 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nodegin/96b8eacc28d26914b51adc1bb7ec2459 to your computer and use it in GitHub Desktop.
Save nodegin/96b8eacc28d26914b51adc1bb7ec2459 to your computer and use it in GitHub Desktop.
Nginx + phpMyAdmin + Node.js
server {
listen 8080 default_server;
listen [::]:8080 default_server ipv6only=on;
root /home/ubuntu;
index index.php index.html index.htm;
server_name localhost;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location /pma/ {
try_files $uri $uri/ /index.php;
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
access_log off;
expires 360d;
}
}
location ~ \.php$ {
include fastcgi_params;
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;
fastcgi_intercept_errors on;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment