0

I have 3 domain names and am trying to host all 3 sites on one server (using Windows Server 2019) using Nginx.

Two of them are html websites, and are working perfectly when nginx is launched The other one tho, which is using php-cgi, call me a 403 error when i try to get on it

In my nginx error log, I see: [error] 24488#9188: *33 directory index of "C:\Users\vpsngamp\Desktop\Nginx/html/sites-availables/void-streaming.fr/" is forbidden, client: 162.158.94.134, server: void-streaming.fr, request: "GET / HTTP/1.1", host: "void-streaming.fr"

My nginx.conf looks like this:

 #
    # void-streaming.fr (HTTP -> HTTPS)
    #

    server {
        listen 80;
        server_name void-streaming.fr;

        return 301 https://void-streaming.fr$request_uri;
    }

    #
    # void-streaming.fr (HTTPS)
    #

    server {
        listen 443 ssl;

        ssl_certificate     C:/Users/vpsngamp/Desktop/Nginx/ssl/void-streaming.fr.pem;
        ssl_certificate_key C:/Users/vpsngamp/Desktop/Nginx/ssl/void-streaming.fr.key;

        access_log C:/Users/vpsngamp/Desktop/Nginx/logs/void-access.log;
        error_log C:/Users/vpsngamp/Desktop/Nginx/logs/void-error.log;

        server_name void-streaming.fr;

        location / {
            root  html/sites-availables/void-streaming.fr;
            index index.html index.htm;
        }

        #
        # FAST-CGI FORWARD FOR PHP
        #

        location ~ \.php$ {
            fastcgi_pass   127.0.0.1:9123;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }
    }

I've looked at Nginx 403 forbidden for all files but that didn't help.

Any ideas on what might be wrong?

SaltyLTS
  • 1
  • 1

0 Answers0