Reputation: 1363
In Apache conf's Servername setting, I need to specify a directory.
Such as Servername www.example.com/directory. I trid and it does not work, though.
I have a main site (www.example.com) which documentroot is /var/www/html/main and my sub site URL is www.example.com/sub and its documentroot is /var/www/html/sub.
Thank you.
Upvotes: 1
Views: 108
Reputation: 28174
www.example.com/directory
is not a valid value for ServerName
. Only hostname and port can be included in the value for ServerName
.
What you want to define is called an Alias
. You can read about Alias
here.
For example, inside of your configuration for www.example.com
, you can add this line:
Alias /sub /var/www/html/sub
Upvotes: 3