I have a DNS entry for helpdesk.test.ez-ms.com that is an A record and it resolves to the correct address (same address as ezupgrade.test.ez-ms.com)
I have a VirtualHost setup with a ServerName of ezupgrade.test.ez-ms.com.
I thought I could just add a ServerAlias helpdesk.test.ez-ms.com to the above ServerName/VirtualHost and it would serve the requests for helpdesk.test.ez-ms.com.
However, when I do curl helpdesk.test.ez-ms.com I get Unknown HTTP_HOST (helpdesk.test.ez-ms.com). returned from httpd.
a curl ezupgrade.test.ez-ms.com returns the correct result for running index.php with no parameters.
What am I missing? I have restarted httpd and named but it doesn't seem to want to find index.php in the ServerName's home directory when addressed via helpdesk.test.ez-ms.com.
I'm sure I'm overlooking something simple! But sure can't see it.
Hmmm, any chance you could post the related VirtualHost config section from your Apache config?
Thanks!
-Eric
sure, here ya go
Hrm, is that really how it looks, or is the forum here just mangling it? :-)
You might want to try putting that in at something like http://pastie.org/ , and just linking the page it gives you here... thanks!
-Eric
That is a cut/paste from my httpd.conf.
What do you see? That's how VM set it up for a domain of ezupgrade.test.ez-ms.com with a couple of added aliases that are in my template.
What is pastie.org? Guess I'll have to check it out if there are no answers here.
tony
Pastie is a site that allows you to copy and paste "stuff" into it for others to see.
What I see in your paste above is a bunch of HTML tags, which I think this software inadvertently added. I doubt Apache wouldn't even start with the code I see in it above :-)
So my thoughts are either:
Try pasting that into pastie.org
Try adding your config as an attachment to your post here
Thanks!
-Eric
Really, the code window with the VirtualServer block looks fine from here... What 'config' are you referring to for me to attach?
I don't want to have to create a separate server for this and then fiddle with the UID/GID stuff so I can get both to be served from the same directory.
If you can't read what's posted, is there a different method/manner in which I can get it to you?
tony
Actually, there is a problem with the virtualhost's conf file, at least as it is displayed here. You have HTML code in there, which should not be the case.
Take for instance lines 5-8. You have
ServerAlias <a href="http://www.ezupgrade.test.ez-ms.com ServerAlias" title="www.ezupgrade.test.ez-ms.com ServerAlias">www.ezupgrade.test.ez-ms.com ServerAlias</a> helpdesk.test.ez-ms.com
See the link there (a href... /a)? Later on you also have italic "em" tags. You do not want any mark up in your conf file. If those truly are in your conf file (i.e. not here because of a something related to your cut and paste) then you will want to remove it.
Blessings!
Chris
Well, not sure how those got in this cut/paste. They are not in the httpd.conf I've re-pasted it again. Hopefully it will come in literally.
tony
It's the forum sw. Apparently it's converting the www.domain.com type names to hyperlinks even inside code tags. It's also translating '*' chars as emphasis tags. So I guess someone will just have to interpet or I can email it to someone who can help.
I'm trying to post it within html tags here. [html] SuexecUserGroup "#506" "#507" ServerName ezupgrade.test.ez-ms.com ServerAlias www.ezupgrade.test.ez-ms.com ServerAlias helpdesk.test.ez-ms.com ServerAlias www.helpdesk.test.ez-ms.com ServerAlias webmail.ezupgrade.test.ez-ms.com ServerAlias admin.ezupgrade.test.ez-ms.com ServerAlias lists.ezupgrade.test.ez-ms.com DocumentRoot /home/ezupgrade/public_html ErrorLog "|/etc/webmin/virtual-server/writelogs.pl 12435805188690 /home/ezupgrade/logs/error_log" CustomLog "|/etc/webmin/virtual-server/writelogs.pl 12435805188690 /home/ezupgrade/logs/access_log" combined ScriptAlias /cgi-bin/ /home/ezupgrade/cgi-bin/ ScriptAlias /awstats /home/ezupgrade/cgi-bin DirectoryIndex index.html index.htm index.php index.php4 index.php5 Options -Indexes IncludesNOEXEC FollowSymLinks ExecCGI allow from all AllowOverride All AddHandler fcgid-script .php AddHandler fcgid-script .php5 FCGIWrapper /home/ezupgrade/fcgi-bin/php5.fcgi .php FCGIWrapper /home/ezupgrade/fcgi-bin/php5.fcgi .php5 AddType application/x-httpd-ruby .rb AddType application/x-httpd-ruby .rbx Action application/x-httpd-ruby /cgi-bin/ruby.cgi allow from all RewriteEngine on RewriteCond %{HTTP_HOST} =webmail.ezupgrade.test.ez-ms.com RewriteRule ^(.) https://ezupgrade.test.ez-ms.com:20000/ [R] RewriteCond %{HTTP_HOST} =admin.ezupgrade.test.ez-ms.com RewriteRule ^(.) https://ezupgrade.test.ez-ms.com:10000/ [R] RemoveHandler .php RemoveHandler .php5 IPCCommTimeout 3600 AuthName "ezupgrade.test.ez-ms.com statistics" AuthType Basic AuthUserFile /home/ezupgrade/.awstats-htpasswd require valid-user PerlRequire /etc/webmin/virtualmin-google-analytics/apachemod.pl PerlOutputFilterHandler Virtualmin::GoogleAnalytics Alias /dav /home/ezupgrade/public_html Alias /pipermail /var/lib/mailman/archives/public DAV On AuthType Basic AuthName ezupgrade.test.ez-ms.com AuthUserFile /home/ezupgrade/etc/dav.digest.passwd Require valid-user ForceType text/plain Satisfy All RemoveHandler .php RemoveHandler .php5 RedirectMatch /cgi-bin/mailman/([^/])(.) https://ezupgrade.test.ez-ms.com:10000/virtualmin-mailman/unauthenticated/$1.cgi$2 RedirectMatch /mailman/([^/])(.) https://ezupgrade.test.ez-ms.com:10000/virtualmin-mailman/unauthenticated/$1.cgi$2 DAV svn SVNParentPath /home/ezupgrade/svn AuthType Basic AuthName ezupgrade.test.ez-ms.com AuthUserFile /home/ezupgrade/etc/svn.basic.passwd Require valid-user AuthzSVNAccessFile /home/ezupgrade/etc/svn-access.conf Satisfy Any [/html]
Well, that didn't work either so not sure how to get the info our here!
Suffice to say the only thing I added to this VirtualServer config is a line of: ServerAlias helpdesk.test.ez-ms.com
after the line regarding the www ServerAlias for the ServerName.
But when I try to access helpdesk.test.ez-ms.com via curl I get the HTTP Host not found message.
Well, I'm not sure what I said in my post above is clicking :-)
Yes, the forum software here is messing up your post by adding weird stuff to it... and the two simplest ways to fix it so that we can see it are:
Attach your config as a text file to the post (so rather than copying and pasting it, you're attaching it as a file)
Go to pastie.org, paste your config file in there, then just follow up here in the forums with a link to the pastie.org URL they give you that contains your config file. Their site won't mess it up the way this one will :-)
Okay, I give up. Tried to attach a *.txt file and get: An HTTP error 0 occurred. /comment-upload/js
I don't really want to go sign up for yet another site just to post information. I had hoped it would be obvious to someone or someone could tell me what needs to be done additionally to simply add a ServerAlias other than to add the alias name to the directive.
Okay, I figured it out and see my error.
The ServerAlias really needs to be in the test.ez-ms.com VirtualServer and then use a RewriteCond/RewriteRule to redirect it to ezupgrade.test.ez-ms.com.
Having it within the ezupgrade.test.ez-ms.com VirtualServer definition simply won't resolve it correctly.
I'm glad you figured it out!
For future reference though (as this comes in handy for many things), pastie.org does not require an account of any sort.
Anyone can anonymously post to it. I'm like you, I don't like signing up for stuff :-)
I find it incredibly valuable for online discussions (for the forums here, IRC, IM conversations, and the like). Just a heads up. Have a good one!
-Eric