LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 03-24-2004, 02:16 PM   #1
Digital_Err0r
Member
 
Registered: Mar 2004
Posts: 80

Rep: Reputation: 15
virtual hosts...


ive been messing around with virtual hosts for about an hour now, and was wondering, my domain is http://foxy.sytes.net, but can i do virtual hosts like, http://foxy.sytes.net/host1/ etc? ive been trying but cant figure it :| ,

thanks

digital
 
Old 03-24-2004, 02:47 PM   #2
Digital_Err0r
Member
 
Registered: Mar 2004
Posts: 80

Original Poster
Rep: Reputation: 15
meh, ive added a virtual host, put 'public_html' in the /etc/skel/ folder. then made a new user, and put the ftp chroot on. the ftp is working. but whenever i go to access http://foxy.sytes.net i get '400 bad request', and the same for http://foxy.sytes.net/~acigolf/

why am i getting bad request?

EDIT -- this is my virtual host in the httpd.conf file:

Code:
NameVirtualHost *
<VirtualHost *>
ServerAdmin blah@email.com
DocumentRoot /home/acigolf/public_html
ServerName acigolf.foxy.sytes.net
ErrorLog /home/acigolf-error.log
CustomLog /home/acigolf-access.log common
</VirtualHost>
EDIT -- and i still get bad request on http://foxy.sytes.net ( the default )

thanks

Last edited by Digital_Err0r; 03-24-2004 at 03:12 PM.
 
Old 03-24-2004, 04:22 PM   #3
Digital_Err0r
Member
 
Registered: Mar 2004
Posts: 80

Original Poster
Rep: Reputation: 15
bump
 
Old 03-24-2004, 04:37 PM   #4
tuxguy
Member
 
Registered: Mar 2004
Location: North Bay, Ontario - CANADA
Distribution: Debian
Posts: 77

Rep: Reputation: 16
Is that subdomain setup at no-ip.com?
acigolf.foxy.sytes.net

plus you have an ssl apache. listening on port 443.. when you type in foxy.sytes.net - the browser assumes you are trying http not https.. this is why you are getting the bad error.
but when you type in https://foxy.sytes.net is give the cannot find server error..??
in your httpd.conf file in the ssl section, you have to enable ssl for virtual servers as well.
 
Old 03-24-2004, 04:44 PM   #5
Digital_Err0r
Member
 
Registered: Mar 2004
Posts: 80

Original Poster
Rep: Reputation: 15
nevemind the subdomain, im just gona use http://foxy.sytes.net/~acigolf/ , anyway i cant find anything about ssl with virtual hosts in the httpd.conf . i just get the bad request through http://foxy.sytes.net . the ftp accounts work fine though~ what should i do about the enabling ssl for virtual hosts ?

thanks
 
Old 03-24-2004, 05:03 PM   #6
Digital_Err0r
Member
 
Registered: Mar 2004
Posts: 80

Original Poster
Rep: Reputation: 15
meh i just ran 'httpd' in the terminal and i get:

Code:
[root@localhost root]# httpd
[Wed Mar 24 22:01:47 2004] [error] VirtualHost _default_:443 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with
undefined results
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down
how can i fix that, because thats my problem....
 
Old 03-24-2004, 05:33 PM   #7
Digital_Err0r
Member
 
Registered: Mar 2004
Posts: 80

Original Poster
Rep: Reputation: 15
bump
 
Old 03-24-2004, 08:00 PM   #8
tuxguy
Member
 
Registered: Mar 2004
Location: North Bay, Ontario - CANADA
Distribution: Debian
Posts: 77

Rep: Reputation: 16
what does your httpd.conf file say about listen? if you want try this...

NameVirtualServer *:80
blah blah....
 
Old 03-25-2004, 02:35 AM   #9
Digital_Err0r
Member
 
Registered: Mar 2004
Posts: 80

Original Poster
Rep: Reputation: 15
hmm i just have

NameVirtualHost *

etc etc....

continuing with the virtual hosts...

should i put

NameVirtualServer *:80

in aswell?
 
Old 03-25-2004, 07:28 AM   #10
tuxguy
Member
 
Registered: Mar 2004
Location: North Bay, Ontario - CANADA
Distribution: Debian
Posts: 77

Rep: Reputation: 16
if your apache is listening on both ports I would say yes give it a shot, cauze your server is listening on port 80. But it's an ssl server (which is port 443)
So just add the port to your NameVirtualHost

Let me know how it goes...
 
Old 03-25-2004, 11:07 AM   #11
Digital_Err0r
Member
 
Registered: Mar 2004
Posts: 80

Original Poster
Rep: Reputation: 15
umm i tried

NameVirtualServer *:80 which apparently isnt even a function according to my apache, and when i set the

NameVirtualHost *

to

NameVirtualHost *:80

i cant access any of the subdirs in the home dir by doing http://foxy.sytes.net/~foxy/

just says cannot find
 
Old 03-25-2004, 11:41 AM   #12
Digital_Err0r
Member
 
Registered: Mar 2004
Posts: 80

Original Poster
Rep: Reputation: 15
rite. this is whats happing at the mo.

in my /home/ dir i have

foxy/
default_user/
acigolf/

so i set the default root for apache to

/home/default_user/public_html/

it loads fine.

i then created two virtual hosts in the httpd.conf file:

Code:
NameVitrualHost *

<VirtualHost *>
ServerName foxy
DocumentRoot /home/foxy/public_html/
ServerAdmin you@blah.com
CustomLog /home/logs/foxy-access.log combined
ErrorLog /home/logs/foxy-error.log
</VirtualHost>

<VirtualHost *>
ServerName acigolf
DocumentRoot /home/acigolf/public_html/
ServerAdmin you@blah.com
CustomLog /home/logs/acigolf-access.log combined
ErrorLog /home/logs/acigolf-error.log
</VirtualHost>
stopped apache and started it seperately. when i try to access http://foxy.sytes.net/~acigolf/ or http://foxy.sytes.net/~foxy/ i get nothing.

what should i be doing to get these to work with virtual hosts and the /~name/ ?

thanks

EDIT --

when i type 'httpd' into the terminal like before i still get

Code:
httpd failed. The error was: Starting httpd: [Thu Mar 25 16:49:46 2004] [error] VirtualHost _default_:443 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
[FAILED]
EDIT EDIT EDIT EDIT EDIT

i cant even start httpd in serivces now i keep getting that error

Last edited by Digital_Err0r; 03-25-2004 at 12:03 PM.
 
Old 03-25-2004, 12:57 PM   #13
Digital_Err0r
Member
 
Registered: Mar 2004
Posts: 80

Original Poster
Rep: Reputation: 15
seeing that i cant even start httpd now, here is my conf file...

http://www.gta-central.com/httpd.conf.txt
 
Old 03-25-2004, 12:58 PM   #14
tuxguy
Member
 
Registered: Mar 2004
Location: North Bay, Ontario - CANADA
Distribution: Debian
Posts: 77

Rep: Reputation: 16
do you really need SSL? if not dont use it... and your are running apache with the ssl mod enabled.. but the default ssl port (443) is no where in your httpd.conf file. Have you made your certificate/key for SSL? I recommend you get http://apache.mirror.secondchapter.i...-2.0.49.tar.gz and build the server without SSL. (if you dont need it.) If you do here is the apache how-to for 2.0 http://httpd.apache.org/docs-2.0/


for the httpd.conf file to acces the public_html files the module has to be in..

Code:
<IfModule mod_userdir.c>
    #
    # UserDir is disabled by default since it can confirm the presence
    # of a username on the system (depending on home directory
    # permissions).
    #
    UserDir "enable" remove comment (#) on this line, and change disable ro enable 

    #
    # To enable requests to /~user/ to serve the user's public_html
    # directory, use this directive instead of "UserDir disable":
    # 
    UserDir public_html

</IfModule>

Last edited by tuxguy; 03-25-2004 at 01:08 PM.
 
Old 03-25-2004, 01:02 PM   #15
Digital_Err0r
Member
 
Registered: Mar 2004
Posts: 80

Original Poster
Rep: Reputation: 15
i dont use ssl, how can i get rid?

edit -- i installed it incase of fututre use with php... it must be possible for it to work with virtual hosts and that.

i cant even get httpd running anymore

Last edited by Digital_Err0r; 03-25-2004 at 01:10 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories jerryasher Linux - Software 7 02-18-2007 07:29 AM
virtual hosts, virtual ip's? kuplo Linux - Newbie 3 11-29-2005 09:44 PM
Help with Virtual Hosts? econnections Linux - Newbie 3 07-02-2005 01:39 PM
Virtual hosts Help carminejg3 Linux - Newbie 2 12-22-2004 03:47 PM
Virtual Hosts chris Linux - General 1 11-20-2001 10:13 PM


All times are GMT -5. The time now is 05:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration