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!
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.
I just installed SSL certificate (Verisign) on my Apache webserver. Everything works perfectly under https but not regular http. Some pages that use http will not be displayed.
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
Posts: 3,233
Rep:
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 12.34.56.78: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 12.34.56.78: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 12:59 PM.
Domain1 site is actually just plain simple html & css with no database involved. This is strange, it is working on NameVirtualHost 12.34.56.78:80 & <VirtualHost 12.34.56.78:80> but not NameVirtualHost *:80 & <VirtualHost *:80>.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.