Support » Installing WordPress » Installing WordPress in subdirectory

  • Resolved rexilli

    (@rexilli)


    Hello guys. I have a Debian Server with a Flask Application (python server on Localhost) i want to install wordpress on http://www.steffes.industries/shop . I use Nginx and the /etc/nginx/sites-enabled/steffes.industries File looks like this:

    I relay don’t now what is wrong.

    server {
    listen 80;
    server_name steffes.industries http://www.steffes.industries;

    root /var/www/html/wordpress;  #WordPress-Installation
    index index.php;
    
    location / {
        proxy_pass http://127.0.0.1:5000;  # Flask-Application - Works Fine
        include /etc/nginx/proxy_params;
    }
    
    location /shop {
        alias /var/www/html/wordpress;  # Alias to WordPress
        try_files $uri $uri/ /shop/index.php?$args;
    
        location ~ \.php$ {
            include snippets/fastcgi-php.conf;
            fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;  # Anpassen Sie die PHP-Version nach Bedarf
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;
        }
    
        location ~* \.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
            access_log off;
            expires max;
        }
    
        location ~ /\.ht {
            deny all;
        }
    }
    
    # Weitere Nginx-Einstellungen...
    
    error_log  /var/log/nginx/steffes.industries_error.log;
    access_log /var/log/nginx/steffes.industries_access.log;

    }

    • This topic was modified 1 month ago by rexilli.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Have you got this working already?

    The URL https://www.steffes.industries/shop/ works fine from my end.

    Thread Starter rexilli

    (@rexilli)

    I fixed it.

    fastcgi_param SCRIPT_FILENAME $request_filename;

    Thanks for the feedback.

    If you have a second to spare, kindly mark your topic as RESOLVED.

    Good luck!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.