Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##
- # You should look at the following URL's in order to grasp a solid understanding
- # of Nginx configuration files in order to fully unleash the power of Nginx.
- # http://wiki.nginx.org/Pitfalls
- # http://wiki.nginx.org/QuickStart
- # http://wiki.nginx.org/Configuration
- #
- # Generally, you will want to move this file somewhere, and start with a clean
- # file but keep this around for reference. Or just disable in sites-enabled.
- #
- # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
- ##
- # Default server configuration
- #
- server {
- listen 80 default_server;
- listen [::]:80 default_server;
- root /var/www/soft-collection-frontend/dist;
- index index.php app.php index.html;
- server_name soft-collection-qa.tendertech.ru;
- location /scapi {
- root $symfonyRoot;
- rewrite ^/scapi/(.*)$ /$1 break;
- try_files $uri @symfonyFront;
- location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
- # Some basic cache-control for static files to be sent to the browser
- expires max;
- add_header Pragma public;
- add_header Cache-Control "public, must-revalidate, proxy-revalidate";
- }
- }
- location / {
- try_files $uri $uri/ @rewrites;
- }
- set $symfonyRoot /var/www/soft-collection-backend/public;
- set $symfonyScript index.php;
- location @symfonyFront {
- fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
- include /etc/nginx/fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $symfonyRoot/$symfonyScript;
- fastcgi_param SCRIPT_NAME /scapi/$symfonyScript;
- fastcgi_param REQUEST_URI /scapi$uri?$args;
- }
- location @rewrites {
- rewrite ^(.+)$ /index.html last;
- }
- }
- # Virtual Host configuration for example.com
- #
- # You can move that to a different file under sites-available/ and symlink that
- # to sites-enabled/ to enable it.
- #
- #server {
- # listen 80;
- # listen [::]:80;
- #
- # server_name example.com;
- #
- # root /var/www/example.com;
- # index index.html;
- #
- # location / {
- # try_files $uri $uri/ =404;
- # }
- #}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement