Hi, I'm migrating an old website from old host to new. The new one i have setup ispconfig and have other working sites with also /wordpress but this for the love of god wont work. Am I missing something here? Root dir - index and all other files are inside the wordpress folder. Expand Code: user@serv:/var/www/website.tld.com/web# ls -la total 36 drwxr-xr-x 6 web4 client3 4096 Nov 22 08:52 . drwxr-xr-x 10 root root 4096 Nov 21 16:47 .. drwxr-xr-x 3 root root 4096 Nov 22 08:52 backup drwxr-xr-x 2 web4 client3 4096 Nov 21 16:47 error -rw-r--r-- 1 web4 client3 7358 Nov 21 16:47 favicon.ico -rw-r--r-- 1 web4 client3 14 Nov 21 16:47 robots.txt drwxr-xr-x 2 web4 client3 4096 Nov 22 00:01 stats drwxr-xr-x 6 web4 client3 4096 Nov 22 08:57 wordpress Visiting the site website.tld.com throws Code: [error] 266518#266518: *8 directory index of "/var/www/website.tld.com/web/" is forbidden, client: 255.255.255.255, server: website.tld.com, request: "GET / HTTP/2.0", host: "website.tld.com" Trying website.tld.com/wordpress throws Code: [error] 266518#266518: *84 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 2359296 bytes) in /var/www/clients/client3/web4/web/wordpress/wp-includes/cron.php on line 1188" while reading response header from upstream, client: 195.211.134.162, server: website.tld.com, request: "GET /wordpress/ HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "website.tld.com" Domain: website.tld.com Document root: /var/www/clients/client3/web4 php 7.0 (FPM) ISPConfig Version: 3.2.11/ Ubuntu 22.04.3 LTS Custom php.ini settings Code: memory_limit = 512M upload_max_filesize = 512M post_max_size = 512M Nginx directive for the site: Expand Code: index index.php index.html index.htm; client_max_body_size 64m; root {DOCROOT}/wordpress; location / { try_files $uri $uri/ /index.php?$args; expires 30d; } # location /wordpress { # try_files $uri $uri/ /wordpress/index.php?$args; # } location ~* /(?:uploads|files)/.*\.php$ { deny all; } location ~ \.php$ { include snippets/fastcgi-php.conf; include fastcgi_params; fastcgi_pass {FASTCGIPASS}; # Use the correct socket for your PHP version fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; fastcgi_buffer_size 16k; fastcgi_buffers 4 16k; } location ~ /\.ht { deny all; } location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } # Cache static files location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ { expires max; log_not_found off; } # Deny access to sensitive files location ~ /\. { deny all; }
This line is invalid and causes nginx to fail. You can not have root path twice in nginx config. You must use subroot instead: https://forum.howtoforge.com/threads/changing-root-directory.82357/#post-442649 so in your case something like: ##subroot wordpress ##
Hi thanks for the quick response. I was bit unsure on the format but looking at the commit i should use the full `##subroot wordpress ##` Code: index index.php index.html index.htm; client_max_body_size 64m; ##subroot wordpress ## location / {....... However I still get the same error: Code: 2023/11/22 11:58:49 [error] 277718#277718: *84 directory index of "/var/www/website.tld.com/web/" is forbidden, client: 255.255.255.255, server: website.tld.com, request: "GET / HTTP/1.1", host: "website.tld.com" Tried to restart nginx and php7.0-fpm manually via `systemctl`