Monday, January 23, 2017

virtualhost - Apache fails after configuration of 2 virtual hosts




Apache does not restart after having changed the configuration.



Error:
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80



File: /etc/apache2/sites-enabled/000-default.conf:



Listen 80


DocumentRoot /var/www/html
ServerName sladie.myserver.com

# Other directives here



DocumentRoot /var/www/html/mydomain.com
ServerName www.mydomain.com


# Other directives here



Got this configuration from the Apache Docs.



Any idea why this does not work?


Answer



If you are using Debian, you don't need to specify Listen 80 in your virtualhost, because is declared in




/etc/apache2/ports.conf:9:Listen 80

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...