[users@httpd] Virtualhost question
Hi all; I'm setting up a new web server, and I'm pretty good with Linux in general but I am not an apache expert. Here's the overall problem: I have a website (mysite.com) I've installed Scientific linux & configured a base apache install. I setup a virtualhost entry in the http.conf file to include a ServerName and a ServerAlias I added a conf.d/myhost.com.conf file with a Directory entry I've also setup a static IP address and a dns entry via noip.com so mysite.com and www.mysite.com both resolve to our static IP At this point I can go to www.mysite.com and my web browser goes to the site as expected, However if I point my browser to mysite.com I get redirected to the default scientific linux apache test page. Thanks in advance for any help/advice... Se the config details below: === Our /etc/httpd/conf/http.conf file includes this: DocumentRoot /var/www/html/mysite ServerName mysite.com ServerAlias www.mysite.com And our /etc/httpd/conf.d/mysite.conf file looks like this: Order Deny,Allow Allow from all AddHandler cgi-script .cgi Options +Indexes +ExecCGI +FollowSymLinks DirectoryIndex index.cgi AllowOverride Limit Options FileInfo Thoughts? - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] VirtualHost configuration not working as expected with ePages solution
On 11/01/2013 8:46 AM, icici...@gmail.com wrote: > > > On 11/01/2013 4:54 AM, "Adam Dosch" wrote: > > > > On Thu, 10 Jan 2013 17:15:48 +, Tom Evans wrote: > >> > >> On Thu, Jan 10, 2013 at 12:03 PM, Tom Frost wrote: > >>> > >>> Hi Adam > >>> > >>> Thanks for your reply. > >>> > >>> Yes, I did c/p and then replace the domains with the placeholders. > >>> > >>> I too noticed that there wasnt any entry for url1.mydomain.com, and I have > >>> been down the same process you advised of starting with one working and > >>> gradually adding. > >>> > >>> So I start off with httpd.conf and the relevant lines are: > >>> > >>> NameVirtualHost *:80 > >>> > >>> Include conf.d/*.conf > >>> > >>> > >> > >> > >> Is this so that this vhost is only loaded in the case that the proxy > >> module is included in Apache? > >> > >> If so, I would completely drop it. If the proxy_module is not > >> available, your website would not work anyway, and better to be told > >> that when starting apache, than apache to silently drop your vhost and > >> start up anyway. > >> > >> If you did want to keep it (and I correctly guessed why it is there), > >> you should replace it with this: > >> > >> > >> > >> I would just drop it though. > >> > >> With this gone, httpd should see the url1.domain.com vhost as the > >> first and default vhost, and all should work. Please test. > > > > > > Tom F, thanks for posting it all. I was too lazy to go look back through the list to find the original postings of your config. > > > > I agree with Tom E., dump that . The chances you aren't going to not load the proxy module some given time I'd say are slim; you're setting it up for a reason, so it's needed. Instead of making your configuration 'that' dynamic, if you decide not to use that vhost for url1 or don't use mod_proxy* for what you're doing, just remove it and quick change the vhost config. Keep it simple. > > > > That has nothing to do with mod_proxy it is variable you set on startup. Read my previous post. I already suggested to remove it which he did with no result he said. > The bottom line is we can discuss this for two years but without knowing the complete config we are not going to get anywhere. Obviously something specific that epages sets creates the problem. I suggest op posts the whole config obfuscating the sensitive info if he needs help. > Plus providing what and how exactly the apache gets started. > > -A > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org > > For additional commands, e-mail: users-h...@httpd.apache.org > >
Re: [users@httpd] VirtualHost configuration not working as expected with ePages solution
On 11/01/2013 4:54 AM, "Adam Dosch" wrote: > > On Thu, 10 Jan 2013 17:15:48 +, Tom Evans wrote: >> >> On Thu, Jan 10, 2013 at 12:03 PM, Tom Frost wrote: >>> >>> Hi Adam >>> >>> Thanks for your reply. >>> >>> Yes, I did c/p and then replace the domains with the placeholders. >>> >>> I too noticed that there wasnt any entry for url1.mydomain.com, and I have >>> been down the same process you advised of starting with one working and >>> gradually adding. >>> >>> So I start off with httpd.conf and the relevant lines are: >>> >>> NameVirtualHost *:80 >>> >>> Include conf.d/*.conf >>> >>> >> >> >> Is this so that this vhost is only loaded in the case that the proxy >> module is included in Apache? >> >> If so, I would completely drop it. If the proxy_module is not >> available, your website would not work anyway, and better to be told >> that when starting apache, than apache to silently drop your vhost and >> start up anyway. >> >> If you did want to keep it (and I correctly guessed why it is there), >> you should replace it with this: >> >> >> >> I would just drop it though. >> >> With this gone, httpd should see the url1.domain.com vhost as the >> first and default vhost, and all should work. Please test. > > > Tom F, thanks for posting it all. I was too lazy to go look back through the list to find the original postings of your config. > > I agree with Tom E., dump that . The chances you aren't going to not load the proxy module some given time I'd say are slim; you're setting it up for a reason, so it's needed. Instead of making your configuration 'that' dynamic, if you decide not to use that vhost for url1 or don't use mod_proxy* for what you're doing, just remove it and quick change the vhost config. Keep it simple. > That has nothing to do with mod_proxy it is variable you set on startup. Read my previous post. I already suggested to remove it which he did with no result he said. The bottom line is we can discuss this for two years but without knowing the complete config we are not going to get anywhere. Obviously something specific that epages sets creates the problem. I suggest op posts the whole config obfuscating the sensitive info if he needs help. > -A > > > - > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org > For additional commands, e-mail: users-h...@httpd.apache.org >
[users@httpd] Re: Compiling Apache httpd 2.4 with FIPS capable OpenSSL on Solaris
My issue has been resolved. In my case I was statically linking the OpenSSL so I needed to do the following before calling httpd configure: export CC=fipsld export FIPSLD_CC=gcc This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. From: Jerry Blasdel/USA/CSC To: users@httpd.apache.org Date: 01/09/2013 11:00 AM Subject:Compiling Apache httpd 2.4 with FIPS capable OpenSSL on Solaris We are trying to get an Apache 2,4 HTTPD executable created from a Fips-capable OpenSSL on Solaris. After building and running the tests on fips-2 and OpenSSL 1.0.1c we build Apache and when we try to start it up we get the following in the error_log: [Wed Jan 09 16:21:30.066478 2013] [ssl:emerg] [pid 23726:tid 1] SSL Library Error: error:2D06B06F:FIPS routines:FIPS_check_incore_fingerprint:fingerprint does not match [Wed Jan 09 16:21:30.066487 2013] [ssl:emerg] [pid 23726:tid 1] AH02312: Fatal error initialising mod_ssl, exiting. Can anyone please provide me a place to start looking for a resolution? Thanks in advance
Re: [users@httpd] VirtualHost configuration not working as expected with ePages solution
On Thu, 10 Jan 2013 17:15:48 +, Tom Evans wrote: On Thu, Jan 10, 2013 at 12:03 PM, Tom Frost wrote: Hi Adam Thanks for your reply. Yes, I did c/p and then replace the domains with the placeholders. I too noticed that there wasnt any entry for url1.mydomain.com, and I have been down the same process you advised of starting with one working and gradually adding. So I start off with httpd.conf and the relevant lines are: NameVirtualHost *:80 Include conf.d/*.conf Is this so that this vhost is only loaded in the case that the proxy module is included in Apache? If so, I would completely drop it. If the proxy_module is not available, your website would not work anyway, and better to be told that when starting apache, than apache to silently drop your vhost and start up anyway. If you did want to keep it (and I correctly guessed why it is there), you should replace it with this: I would just drop it though. With this gone, httpd should see the url1.domain.com vhost as the first and default vhost, and all should work. Please test. Tom F, thanks for posting it all. I was too lazy to go look back through the list to find the original postings of your config. I agree with Tom E., dump that . The chances you aren't going to not load the proxy module some given time I'd say are slim; you're setting it up for a reason, so it's needed. Instead of making your configuration 'that' dynamic, if you decide not to use that vhost for url1 or don't use mod_proxy* for what you're doing, just remove it and quick change the vhost config. Keep it simple. -A - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] VirtualHost configuration not working as expected with ePages solution
On Thu, Jan 10, 2013 at 12:03 PM, Tom Frost wrote: > Hi Adam > > Thanks for your reply. > > Yes, I did c/p and then replace the domains with the placeholders. > > I too noticed that there wasnt any entry for url1.mydomain.com, and I have > been down the same process you advised of starting with one working and > gradually adding. > > So I start off with httpd.conf and the relevant lines are: > > NameVirtualHost *:80 > > Include conf.d/*.conf > > Is this so that this vhost is only loaded in the case that the proxy module is included in Apache? If so, I would completely drop it. If the proxy_module is not available, your website would not work anyway, and better to be told that when starting apache, than apache to silently drop your vhost and start up anyway. If you did want to keep it (and I correctly guessed why it is there), you should replace it with this: I would just drop it though. With this gone, httpd should see the url1.domain.com vhost as the first and default vhost, and all should work. Please test. Cheers Tom - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] VirtualHost configuration not working as expected with ePages solution
> > > ServerName url1.mydomain.com > ServerAlias surl1.mydomain.com > VirtualHost configuration: > 127.0.0.1:443 localhost (/etc/httpd/conf.d/ssl.conf:81) > Syntax OK > > So, again, as you mentioned, Apache doesnt know what to do with > url1.mydomain.com. Is this because the VirtualHost definition is enclosed > within an IfDefine? Well, one that isn't defined, yes. > > But navigating to url1.mydomain.com brings up my epages website (which is > correct). Apache uses the first one listed in a set of name virtual hosts as the default. - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] VirtualHost configuration not working as expected with ePages solution
Hi Adam Thanks for your reply. Yes, I did c/p and then replace the domains with the placeholders. I too noticed that there wasnt any entry for url1.mydomain.com, and I have been down the same process you advised of starting with one working and gradually adding. So I start off with httpd.conf and the relevant lines are: NameVirtualHost *:80 > > >Include conf.d/*.conf > > > > >ServerName url1.mydomain.com >ServerAlias surl1.mydomain.com > > > ProxyPass balancer://cluster/epages/ > ProxyPassReverse balancer://cluster/epages/ > > > ProxyPass xxx > ProxyPassReverse xxx > > > > > >Only the first VirtualHost is specified. apachectl -t -D DUMP_VHOSTS produces: VirtualHost configuration: >127.0.0.1:443 localhost (/etc/httpd/conf.d/ssl.conf:81) >Syntax OK > >So, again, as you mentioned, Apache doesnt know what to do with >url1.mydomain.com. Is this because the VirtualHost definition is enclosed >within an IfDefine? But navigating to url1.mydomain.com brings up my epages website (which is correct). So then I go and add in a second VirtualHost > > >DocumentRoot /var/www/html/myroot >ServerName url2.mydomain.com >ServerAlias url2.mydomain.com > > >and the DUMP_VHOSTS output is: VirtualHost configuration: >127.0.0.1:443 localhost (/etc/httpd/conf.d/ssl.conf:81) >wildcard NameVirtualHosts and _default_ servers: >*:80 is a NameVirtualHost > default server url2.mydomain.com (/etc/httpd/conf/httpd.conf:998) > port 80 namevhost url2.mydomain.com (/etc/httpd/conf/httpd.conf:998) >Syntax OK > >So now Apache knows about url2, but still doesnt know about URL1. And now, url1.mydomain.com and url2.mydomain.com both go to my second site, never epages. --- Sorry for the long message, just trying to show the steps I've taken and the output at each stage. Thanks again for your help. Tom From: Adam Dosch To: Tom Frost ; users@httpd.apache.org Sent: Wednesday, 9 January 2013, 17:36 Subject: Re: [users@httpd] VirtualHost configuration not working as expected with ePages solution Tom, Sorry for the belated reply. > The output requested is: > > VirtualHost configuration: > 127.0.0.1:443 localhost (/etc/httpd/conf.d/ssl.conf:81) > wildcard NameVirtualHosts and _default_ servers: > *:80 is a NameVirtualHost > default server url2.mydomain.com > (/etc/httpd/conf.d/zzz-epages-httpd.conf:215) > port 80 namevhost url2.mydomain.com > (/etc/httpd/conf.d/zzz-epages-httpd.conf:215) > port 80 namevhost url2.mydomain.com > (/etc/httpd/conf.d/zzz-epages-httpd.conf:225) > port 80 namevhost url2.mydomain.com > (/etc/httpd/conf.d/zzz-epages-httpd.conf:215) > port 80 namevhost url2.mydomain.com > (/etc/httpd/conf.d/zzz-epages-httpd.conf:225) > Syntax OK I'm assuming you copy/pasted this out and replaced the real domains to 'protect the innocent'. But if you didn't flub copy/paste, I --do not-- see any indication that Apache knows what to do or will do anything specific when a request comes in for 'url1.mydomain.com'. If you notice the output above, you will always default to 'url2.mydomain.com' for any HTTP request coming in on that listening service on that IP address. There isn't --any-- VirtualHost reference to 'url1' listed. I forgot what your VirtualHost containers looked like for both ur1 and ur2 domains, but I think you definitely just take a isolation approach to it: work with one, get it working with it's own VirtualHost container, then add another vhost in and so on, then re-verify with 'apachectl -t -D DUMP_VHOSTS' and from a web browser. From there once you get it nailed down, then do any merging for maintenance sake on your .conf files. Hope that helps. -A > > - > FROM: Adam Dosch > TO: Tom Frost ; users@httpd.apache.org > SENT: Thursday, 3 January 2013, 19:28 > SUBJECT: Re: [users@httpd] VirtualHost configuration not working as > expected with ePages solution > > Tom, > > I'd be curious what the output of your 'apachectl -t -D DUMP_VHOSTS' > looks like? > > I've come across this problem as well in a related degree, and > interrogating the output of the 'DUMP_VHOSTS' above will at least tell > you the top-to-bottom order your vhost requests will travel down in > your configuration. > > One way I had to solve it was take my VirtualHost container for > '_default_', put it in it's own configuration file and include it > prior to any other vhost config files in httpd.conf. It looked a bit > like this in my httpd.conf: > > NameVirtualHost *:80 > Include conf/mydefault-vhost.conf # which would contain your default > vhost container for url2.mydomain.com > Include conf/*-vhost.conf # contain your others like url1, urlfoo, > urlboo, urlbar, etc., it would be one config, or many, your choice. > > Using this approach, I did notice that a blanket wildcard/greedy > include of all *.conf file giv