I have an apache server running with two folders in a subdirectory (/var/www/html/example), a virtual host config in httpd.conf serves URLs from /var/www/html/example/website and /var/html/example/service
I'd like the /var/html/example/service folder to be the root when navigating to example.com/services/ and I'd like /var/www/html/example/website to be the root when accessed via example.com/
From my httpd.conf file this is what I added (unsurprisingly it doesn't work but for clarities sake):
<VirtualHost *:80> ServerName www.example.com ServerAlias example.com/services DocumentRoot /var/www/html/example/service </VirtualHost> <VirtualHost *:80> ServerName www.example.com ServerAlias mysite.com www.example.com DocumentRoot /var/www/html/example/website </VirtualHost>
Is this possible to achieve? I was thinking of using redirects or changing virtualhost to do it if that's even possible. I'm mostly worried about the website conflicting with the services.
The website will be a WordPress site if that affects anything.