Apache2 VirtualHost Syntax OK but domain still doesn't work
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Apache2 VirtualHost Syntax OK but domain still doesn't work
Hi,
I'm trying to add another virtual host for my apache2 server (running on Gentoo Linux) and it doesn't work eventhough apache2ctl -S shows syntax OK....I have around 5 VirtualHost on my apache2 server and they are working fine, but when I try to add another virtualhost it doesn't work (browser says cannot display page)
The "*:80" is not a problem is simply means that apache will respond to all the interfaces on the server for that vhost.
You need to setup an error and access log for the vhost and then take a look at what apache is logging.
I suspect 2 things could cause that.
1. The app running in the document root has errors
2. Apache cannot search the path due to permission settings being incorrect, for apache to be able to server content all the directores above need to have the -x bit set.
The "*:80" is not a problem is simply means that apache will respond to all the interfaces on the server for that vhost.
You need to setup an error and access log for the vhost and then take a look at what apache is logging.
I suspect 2 things could cause that.
1. The app running in the document root has errors
2. Apache cannot search the path due to permission settings being incorrect, for apache to be able to server content all the directores above need to have the -x bit set.
1. The app running in the document root has NO errors because it's just a simple html file with HELLO output string
2. Permission to document root folder and above folders are fine, I can access document root folder by going though bizdata.laolao.com/logoStore but logostore.laolao.com doesn't work
Like I said, fgo.laolao.com is working but not logostore.laolao.com. Is there anything else that could make this happen ? I just started working at this company and this apache2 server was configured by previous Administrator, and I'm new to apache too. Is there some place else in Apache server that could explicitly define to allow DNS recognizing fgo.insightrix.com ?
After doing searching around, I think my problem is I need to configure DNS server probably (Gentoo Linux). Could anyone show me steps by steps of how to configure DNS server ?
Before you do that though, try adding fgo.laolao.com and logostore.laolao.com to the hosts file of whatever machine you are testing from to make sure that's the issue. No point going through all that setup to find it doesn't fix your problem.
Two simple lines should do it (don't deleted what's there already) - say the apache server's IP is 1.2.3.4
Before you do that though, try adding fgo.laolao.com and logostore.laolao.com to the hosts file of whatever machine you are testing from to make sure that's the issue. No point going through all that setup to find it doesn't fix your problem.
Two simple lines should do it (don't deleted what's there already) - say the apache server's IP is 1.2.3.4
Did you try reversing the entries for virtualhosts?
Thanks very much guys, I finally got it working, I had to do something with DNS binding...Specifically I added an entry for "logostore" into the file host.zone under /var/bind
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.