0

So I have a new tool installed on my webserver and it has a somewhat complicated folder structure, in order to get it to run, I put everything in a subdirectory and serve that as root of my domain.

The corresponding .conf

    <VirtualHost *:80>
    ServerName example.com
    DocumentRoot /var/www/html/example/public
    <Directory /var/www/html/example/public>
        AllowOverride All

       # Apache 2.2
        Order Allow,Deny
        Allow from All

        # Apache 2.4
        # Require all granted

        FallbackResource /index.php
    </Directory>
RewriteEngine on
RewriteCond %{SERVER_NAME} =example.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

But now other sites that were served fine before are 404ing on me (the error message comes from the fresh hosted site.

So /var/www/html/example2 requested per http(s)://example.com/example2 isn't showing up anymore.

I'm the first to admit I am not very knowledgeable about Apache Configs, but there must be a way to solve this, any help is kindly regarded.

  • "So /var/www/html/example2 requested per http(s)://example.com/example2" - but you've not shown us the config for that vhost. – symcbean Aug 18 '23 at 09:34
  • As per now I have no .conf, I tried to make one, but without any success... (Tried an ALIAS), but I don't have that failing .conf anymore. – tulekparson Aug 18 '23 at 09:38
  • If you can connect via SSL then you must have a vhost configuration. – symcbean Aug 18 '23 at 10:53
  • Before I made the changes mentioned above I had a 000-default.conf with the root of the domain pointing to /var/www/html so all sites where served from that vhost. That's not working anymore because the domain root is pointing to /var/www/html/example I even tried copying /var/www/html/example2 to /var/www/html/example/example2 didn't work either, the script residing in [...]/example doesn't like that, I guess, because the 404 error I get is in the design and coloring of that script... Edit: Any pointers how a site.conf for subdirectories has to look? – tulekparson Aug 18 '23 at 11:14

0 Answers0