Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • In order to made your assets accessible when your index.php file along with its assets is placed in any nested directory, the resulting HTML document should refer its assets using relative URLs (e.g. ./style.css or style.css) rather than absolute ones (e.g. /style.css). Commented Dec 2, 2024 at 18:06
  • Assets within the web app are already refered with relative path. When subdirectory is configured in Apache with the below it's working. Not in Nginx. DocumentRoot "/var/www/html" <Directory "/var/www/html"> Options +Indexes +FollowSymLinks +ExecCGI AllowOverride All Require all granted </Directory> Alias /nesting"/var/www/html/nesting/" <Directory "/var/www/html/nesting/"> Options +Indexes +FollowSymLinks +ExecCGI AllowOverride All Require all granted </Directory> Commented Dec 5, 2024 at 11:20