Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- map $sent_http_content_type $expires {
- "text/html" epoch;
- "text/html; charset=utf-8" epoch;
- default off;
- }
- server {
- listen 80; # the port nginx is listening on
- server_name your-domain; # setup your domain here
- gzip on;
- gzip_types text/plain application/xml text/css application/javascript;
- gzip_min_length 1000;
- location / {
- expires $expires;
- proxy_redirect 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_set_header X-Forwarded-Proto $scheme;
- proxy_read_timeout 1m;
- proxy_connect_timeout 1m;
- proxy_pass http://127.0.0.1:3000; # set the address of the Node.js instance here
- }
- include phpmyadmin.conf;
- location ~ ^\/mysql(\/?)$ {
- return 301 /phpmyadmin/;
- }
- }
- server {
- listen 8000;
- server_name server_domain_or_IP;
- root /var/www/default/site/laravel/public;
- add_header X-Frame-Options "SAMEORIGIN";
- add_header X-XSS-Protection "1; mode=block";
- add_header X-Content-Type-Options "nosniff";
- index index.html index.htm index.php;
- charset utf-8;
- location / {
- try_files $uri $uri/ /index.php?$query_string;
- }
- location = /favicon.ico { access_log off; log_not_found off; }
- location = /robots.txt { access_log off; log_not_found off; }
- error_page 404 /index.php;
- location ~ \.php$ {
- fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
- include fastcgi_params;
- }
- location ~ /\.(?!well-known).* {
- deny all;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement