|
Home > Archive > Web Servers on Unix and Linux > June 2004 > Apache and Default vhost
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Apache and Default vhost
|
|
| Andrew 2004-06-26, 10:55 am |
| Help!,
i ahve been struggeling with this problem for hours now, and have
tried everything that i can find and think of!, i have a static ip and
go through a modum/router and i think that i have sucessfuly allowed
the ports to come through.
The problem:-
i have two vhosts, hoping that the first will be the default, when i
ran a Vhost-dump i got:-
VirtualHost configuration:
*.*.*.*:80 is a NameVirtualHost
default server www.MyDefaultServer.com
(/(somewhere)/httpd.conf:724)
port 80 namevhost www.MyDefaultServer.com
(/(somewhere)/httpd.conf:724)
port 80 namevhost www.MyPage.com
(/(somewhere)/httpd.conf:751)
wildcard NameVirtualHosts and _default_ servers:
_default_:443 new.host.name (/(somewhere)/ssl.conf:90)
(98)Address already in use: make_sock: could not bind to address
0.0.0.0:443
no listening sockets available, shutting down
Also, no matter what order i put the two hosts, when i call MyPage.com
it automaticaly goes to the index.html page, when i call the
MyDefaultServer.com page, it displays the index.html page of
MyPage.com, further more when i type in MyDefaultServer.com/index.html
it displays the right page!.
What could i be doing wrong?
Andrew
| |
| Andrew 2004-06-27, 2:46 am |
| Thanks Randell,
there was a Virtualhost name/ip/port problem, and in the end i managed
to sort it out.
Now that I have resolved that, I have another question/problem (i have
looked for a solution on google but no luck), in my default
virtualHost page i would like to have linked buttons to web pages that
i will/am hosting on my server.
So far hitting a button on the default page when viewing on the server
machine it works (probably knows what to do), but when attempting to
do the same think from a remote computer, it doesn't work, it "plugs"
the url into the address bar, but as i am testing and not fully
opperational, cannot find (i understand search engines). what i would
like is if the default page could have a link to point to the
directory index.html page in a) the same user, but different file
(parralell), and eventualy to b) a file(s) in different users
accounts.
(i am using redhat 9 & apache 2)
Thanks heeps
Andrew
| |
| Andrew 2004-06-29, 8:55 am |
| I have actualy an answer, but not quite as i'd liked, as when called
from a html page (like <a href="mysite/">mysite</a> ), an example
below:-
<virtualhost www.myhost.com>
ServerName www.Myhost.com
DocumentRoot /home/user/myhost/htdocs
DirectoryIndex index.html
ServerAdmin me@myhost.com
AddHandler cgi-script pl cgi
Alias /mysite/ /home/user/mysite/htdocs/
Alias /cgi-bin-mysite/ /home/user/mysite/htdocs/cgi-bin/
Alias /images-mysite/ /home/user/mysite/htdocs/images/
Alias /mysite2/ /home/user/mysite2/htdocs/
Alias /images-mysite2/ /home/user/mysite2/htdocs/images/
<Directory "/home/user/myhost/htdocs">
Options Indexes +Includes +FollowSymLinks +ExecCGI +MultiViews
AllowOverride None
Allow from all
Order allow,deny
</Directory>
</virtualhost>
<virtualhost www.mysite.com>
ServerName www.mysite.com
(yada yada yada)
</virtualhost>
<virtualhost www.mysite2.com>
ServerName www.mysite2.com
(yada yada yada)
</virtualhost>
the "kinda-problem" is that i have to specificaly name all the
directories that go with the site, as in "images-mysite2",
"images-mysite-1".
What i want to achieve is to transfer the complete URL internaly, and
not have http://www.MyHost.com/mysite/index.html, but have
http://www.Mysite.com/ (i.e. a complete transfer)
any suggestions anyone?
Thanks
Andrew
|
|
|
|
|