Answer the question
In order to leave comments, you need to log in
Apache on two hosts, how to set up?
you need one site to respond to localhost, and the other, for example, to test.dev.
In the hosts file, I already made a separate host, the question remains how to configure /etc/apache2/httpd.conf.
If anyone can advise, I'll be grateful
Answer the question
In order to leave comments, you need to log in
in vhosts.conf on Windows and /etc/apache2/sites-enabled/yoursite.conf on penguins
there is a ServerName directive
Set the second host with the ServerAlias directive
<VirtualHost *:80>
ServerName hotspot.lan
ServerAlias host2.com
ServerAdmin [email protected]
ErrorLog /var/www/hotspot/error.log
DocumentRoot /var/www/hotspot
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question