javaguy Posted March 11, 2004 Report Share Posted March 11, 2004 Okay, I've Googled this to death, read through all these forums, posted on various ones. Finally I gave up a number of weeks ago, but now I'm back at it with a vengence and am going to hammer at it until I get it working. I'm running Mandrake 9.2 and trying to run Apache 2. I have three domains that I want to run on my box, but for the moment I just want to get one working before I move the other two from their current stable environment. I'm using ZoneEdit. Now everyone says, and all the documentation says, that in my Vhosts.conf I should use an asterisk with each host declaration: NameVirtualHost * <VirtualHost *:80> ServerName www.benjaminalexandermckee.com ServerAlias benjaminalexandermckee.com DocumentRoot /home/javaguy/www/prod/benjaminalexandermckee </VirtualHost> But when I do that and try to connect to http://benjaminalexandermckee.com I get a message that says my browser is speaking plain HTTP to an SSL-enabled server port, which should not be the case. When I change the vhost to say... <VirtualHost 24.209.107.57:80> ... ...then I get a message saying I don't have permission to access / on this server. Now before everybody asks, the directory given by DocumentRoot is readable and executable to Others, and everything inside of it is readable to Others. Inside my commonhttpd.conf file I have an entry that looks like this: <Directory /home/javaguy/www/prod/benjaminalexandermckee> Options Indexes FollowSymLinks MultiViews AllowOverRide All Order allow,deny Allow from all </Directory> I'm utterly mystified by this. And I don't want to have to hard-code the IP address in the VirtualHost directive. I want to be able to use an asterisk so that I can use ZoneEdit. I'd also like to have a *:80 and *:443 version of each virtual host so that I can use SSL when I want. Has anybody gotten this to work? All the forum posts I've read talk about how it's theoretically possible, but the person actually doing it always says he got it to work by dropping the asterisk and hard-coding the IP address, which isn't an option for me. Thanks in advance, Sam Quote Link to comment Share on other sites More sharing options...
Guest anon Posted March 11, 2004 Report Share Posted March 11, 2004 Maybe you could post the whole of your httpd.conf file, might be easier to figure out whats wrong. I see that this works though: https://benjaminalexandermckee.com Quote Link to comment Share on other sites More sharing options...
javaguy Posted March 11, 2004 Author Report Share Posted March 11, 2004 Httpd2.conf: http://sammckee.com/httpd2.conf Commonhttpd.conf: http://sammckee.com/commonhttpd.conf Also, I can connect to https://benjaminalexandermckee.com, but the page that come up is not the page that is in /home/javaguy/www/prod/benjaminalexandermckee. Thanks for your time. Quote Link to comment Share on other sites More sharing options...
Guest anon Posted March 11, 2004 Report Share Posted March 11, 2004 I can't get to those links/files. "permission denied" Quote Link to comment Share on other sites More sharing options...
javaguy Posted March 11, 2004 Author Report Share Posted March 11, 2004 Now try it. Quote Link to comment Share on other sites More sharing options...
Guest anon Posted March 11, 2004 Report Share Posted March 11, 2004 Will look at it some more later when i have time. BUT, whats hits me straight away is you have commented out (#) your document root. You can server docs from whatever dir you like, but you must have a document root. This is normally /var/www/html but if for some reason you want some other directory, then set that to be your root directory. example: DocumentRoot /home/someplace/ Quote Link to comment Share on other sites More sharing options...
javaguy Posted March 11, 2004 Author Report Share Posted March 11, 2004 I uncommented it. It still doesn't work, but that's helpful to know anyway, so thanks. I uploaded the updated files to the web site, so those links show the latest conf files. Quote Link to comment Share on other sites More sharing options...
Guest anon Posted March 11, 2004 Report Share Posted March 11, 2004 Ummm... you do know that after you make changes and save the file, you need to restart Apache, or if your using webmin "apply changes" ? Quote Link to comment Share on other sites More sharing options...
javaguy Posted March 11, 2004 Author Report Share Posted March 11, 2004 Yes, I have sudoers entry and an alias for it: alias bounce='sudo /etc/rc.d/init.d/httpd restart' and I get [javaguy@dhcp024-209-107-057 javaguy]$ bounce Shutting down httpd2: [ OK ] Starting httpd2: [ OK ] [javaguy@dhcp024-209-107-057 javaguy]$ Quote Link to comment Share on other sites More sharing options...
Guest anon Posted March 11, 2004 Report Share Posted March 11, 2004 Put the commonhttpd.conf file back to the default, you should be altering the httpd.conf file instead, not this one. In case you can't remember what the default looks like: ### Common server configuration # User apache Group apache # # ServerAdmin: Your address, where problems with the server should be # e-mailed. This address appears on some server-generated pages, such # as error documents. # ServerAdmin root@localhost # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DO NOT MODIFY THIS ONE, USE httpd.conf and httpd-perl.conf DocumentRoot /var/www/html # # Each directory to which Apache has access, can be configured with respect # to which services and features are allowed and/or disabled in that # directory (and its subdirectories). # # First, we configure the "default" to be a very restrictive set of # permissions. # # Also, for security, we disable indexes globally # <Directory /> Options -Indexes FollowSymLinks MultiViews AllowOverride All </Directory> #Restricted set of options <Directory /> Options All AllowOverride All <IfModule mod_access.c> Order deny,allow Allow from all </IfModule> </Directory> Quote Link to comment Share on other sites More sharing options...
javaguy Posted March 11, 2004 Author Report Share Posted March 11, 2004 Okay done (and updated the copy in my link). Still no luck, but now what do I need to look at? Quote Link to comment Share on other sites More sharing options...
Guest anon Posted March 11, 2004 Report Share Posted March 11, 2004 Okay done (and updated the copy in my link). Still no luck, but now what do I need to look at? You don't have a link to your httpd.conf file above, that is the file you should be editing. That file is in /etc/httpd/conf/httpd.conf Quote Link to comment Share on other sites More sharing options...
javaguy Posted March 11, 2004 Author Report Share Posted March 11, 2004 httpd2.conf is the only one I see in /etc/httpd/conf. Quote Link to comment Share on other sites More sharing options...
Guest anon Posted March 11, 2004 Report Share Posted March 11, 2004 Maybe you had a bad install of Apache then. The folder should contain most of these files, see screenshot below. Quote Link to comment Share on other sites More sharing options...
javaguy Posted March 12, 2004 Author Report Share Posted March 12, 2004 It's the install that Mandrake 9.2 did when I installed the OS, and it worked as far as showing the default "It works" web site until I started messing with virtual hosts and apparently screwed it up myself. ;) I don't recall seeing an httpd.conf file--in fact I recall thinking it a little odd that there was an httpd2.conf. I figured it just had something to do with the fact I'm running Apache2. Anyway, I uninstalled the rpm and reinstalled it, but still no httpd.conf. If I really need this file, can somebody post one? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.