1 year ago

403 in production

Posted 1 year 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


gives 403. Here is my nginx conf:

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


    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?


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