Installing WordPress in subdirectory | WordPress.org

[ad_1]

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 5 hours, 51 minutes ago by rexilli.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer