Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Check in your apache error log. In most installations is it is a location like /var/log/httpd or /var/log/apache and then the log file will be error.log. This should give you a clear indication of why it did not resolve the page.
Without knowing the error message, it is nearly impossible to guess as to what the problem could be.
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
did you create a separate virtual host for both http (port 80) and https (port 443) ? both should be pointing at the same document root but the one with 443 should be configured to use the certificates and serve on port 443, the other shouldn't be configured to use any certificates and serve on port 80.
I realize that you tried to sanitize your post against putting your real domain or address in your response, but you need to double check your httpd.conf because you have four hosts listed as <VirtualHost 220.127.116.11:80> with different document roots and it looks like you have duplicates. My understanding of Apache is that you have the choice of using NameVirtualHost or IP identified virtual hosts. If you are identifying the hosts with the IP address and they all have the same IP address, it will pick the first one that matches. Instead you should try using *:80 in the virtual host declaration and declare NameVirualHost *:80, somewhere like the top of your httpd.conf. Traditionally, this won't work with secured sites, but if you only have one, it is a non issue.
Thanks for the response...my boss didn't want me to expose the real company info here. Anyways, the httpd.conf was actually setup by the previous people who worked here before, with couple name-based virtual hosts (not IP identified) sharing the same IP address. I guess from my understanding, the virtual host duplicate purposes are for redirecting, for example "www.domain1.com" & "domain1.com" to "https://www.domain1.com".
I had tried to replace all <VirtualHost 18.104.22.168:80> with <VirtualHost *:80> and also Name VirtualHost *.80, then restart the httpd. I got "Error establising a database connection" on domain1 but domain2 still working with https.
I got "Error establising a database connection" on domain1 but domain2 still working with https.
Domain1 and Domain2 are using different document roots with different source paths right? The error message sounds like you have a SQL backend to your web server and something is configured wrong in the database connection. Normally, in the scripting language, you will have a connection string with the user name, database, and password. I would double check that all of this is the same for both as it sounds like Domain1 is not able to establish the connection for some reason. Searching through the code for that particular error message should show you right where the connection is being attempted and failing too.
I think that the error message "Error establising a database connection" is not pointing to an apache problem. It might be indicating that the website no longer can connect the database; time to look in the PHP files to see how it exactly works.
PS Noway2 beat me to it
Last edited by Wim Sturkenboom; 06-02-2011 at 01:59 PM.
Domain1 site is actually just plain simple html & css with no database involved. This is strange, it is working on NameVirtualHost 22.214.171.124:80 & <VirtualHost 126.96.36.199:80> but not NameVirtualHost *:80 & <VirtualHost *:80>.