problem

 avatar
unknown
nginx
4 years ago
1.6 kB
23
Indexable
#default

server {
 root /var/www/html;
 index index.html index.htm index.nginx-debian.html;

 server_name ubuntu.sample.net;

 location / {
  try_files $uri $uri/ =404;
 }
}

#beta

server {
 root /var/www/Website-beta;
 listen 80;
        index index.php index.html index.htm index.nginx-debian.html;

        server_name beta.ubuntu.sample.net;

        location / {
                try_files $uri $uri/ /index.php$is_args$args;
        }

        location = /favicon.ico { log_not_found off; access_log off; }
        location = /robots.txt { log_not_found off; access_log off; allow all; }
        location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
                expires max;
                log_not_found off;
        }

        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
        }
}

#prod

server {
        root /var/www/Website;
        listen 80;
        index index.php index.html index.htm index.nginx-debian.html;

        server_name prod.ubuntu.sample.net;

        location / {
                try_files $uri $uri/ /index.php$is_args$args;
        }

        location = /favicon.ico { log_not_found off; access_log off; }
        location = /robots.txt { log_not_found off; access_log off; allow all; }
        location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
                expires max;
                log_not_found off;
        }

        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
        }

}
Editor is loading...