Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name www.test.example.com;
- return 301 $scheme://test.example.com$request_uri;
- }
- server {
- listen 80;
- server_name test.example.com;
- root /opt/cura/current/public;
- index index.html index.htm index.php;
- charset utf-8;
- location / {
- ####### HANDLE PREFLIGHTED REQUESTS #############
- if ($request_method = OPTIONS ) {
- add_header "Access-Control-Allow-Origin" "http://test.example.com";
- add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
- add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept, x-csrf-token";
- return 200;
- }
- 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; }
- # access_log off;
- access_log /var/log/nginx/cura-access.log main;
- error_log /var/log/nginx/cura-error.log error;
- error_page 404 /index.php;
- location ~ \.php$ {
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_pass 127.0.0.1:9000;
- include snippets/fastcgi-php.conf;
- include fastcgi_params;
- #include snippets/cura.com-cors;
- }
- location ~ /\.ht {
- deny all;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement