Host Subdirectory via Nginx

  • Hey Guys!


    This might be the wrong place to ask for help, since this is a nginx-server issue that has nothing to do with the nginx-plugin but maybe there are some nginx-pros around that cna help me



    Today i tried to create a subdirectory with an index.php file that i want to host via the running nginx server


    I tried the following:
    cd /var/www/openmediavault
    mkdir transfer
    chown www-data transfer
    cd transfer
    nano index.php (wrote php code)
    chmod 664 index.php


    then i changed the config file in /etc/nginx/sites-available
    nano /etc/nginx/sites-available/openmediavault-webgui



    and added the following lines:

    Code
    location /transfer {
            root /var/www/openmediavault/transfer;
            index index.php;
        location ~ \.php(?|$) {
            include /etc/nginx/fastcgi_params;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_pass 127.0.0.1:9000;
        }
    }


    then i restarted the nginx service:
    service nginx restart


    now when wanna access the site i get a 404 Error:


    Error 404
    Sorry, the page you requested was not found.



    I'm desperate for help!!!


    Thanks a lot in advance

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!