virtualhost - What values are valid for use with ServerName when setting up Apache virtual hosts locally? -
i'm setting apache virtual hosts number of websites need develop on localhost. using following configuration (and after updating /etc/hosts
file), can access content stored @ /var/www/example.com/public_html
going example.com
in web browser:
<virtualhost *:80> servername example.com documentroot /var/www/example.com/public_html ... </virtualhost>
my question:
are there rules choosing values servername
? example, must value use domain name such servername example.com
or can omit .com
extension , use servername example
? must use lowercase characters, etc.?
you can use whatever name want local domain. @ documentation.
servername apache
servername [scheme://]fully-qualified-domain-name[:port] servername directive sets request scheme, hostname , port thatthe server uses identify itself. used when creating redirection urls.
Comments
Post a Comment