giorg
115
0
Laravel

403 in production

Posted 9 months ago by giorg

Hi, using Valet here. On my local environment everything works fine. Trying to put all on production now, the home is working, /about page is working as well, but for example this

/games/magicd/

gives 403. Here is my nginx conf:

server { listen 80; listen [::]:80;

    server_name games.setsnc.com;

    root /var/www/shitter/public;
    index index.php index.html;

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Content-Type-Options "nosniff";
    charset utf-8;
    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 / {
            try_files $uri $uri/ =404;
    }

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

    location ~ /\.ht {
            deny all;
    }

    location ~ /\.(?!well-known).* {
            deny all;
    }

}

what am I doing wrong?

thanks

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.