Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name fbsample.linuxserv.space;
- root /var/www/fbsample;
- return 301 https://$host$request_uri;
- }
- server {
- listen 443 ssl;
- server_name fbsample.linuxserv.space;
- root /var/www/fbsample;
- ssl_certificate /etc/letsencrypt/live/fbsample.linuxserv.space/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/fbsample.linuxserv.space/privkey.pem;
- access_log /var/log/nginx/fbsample.access.log;
- error_log /var/log/nginx/fbsample.error.log;
- location /live {
- 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 /socket.io {
- proxy_pass http://127.0.0.1:3000;
- proxy_redirect off;
- proxy_buffering off;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "Upgrade";
- }
- location /static {
- root /var/www/fbsample/live/public;
- }
- location / {
- index index.php;
- try_files $uri $uri/ /index.php?$query_string;
- }
- location ~ \.php$ {
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.html;
- fastcgi_param SCRIPT_FILENAME /var/www/fbsample$fastcgi_script_name;
- include /etc/nginx/fastcgi_params;
- }
- location ~ /\.ht {
- deny all;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment