Jump to content
The Uniform Server Community
Sign in to follow this  
simardbrad

Need A Lot of Help with VHosts!

Recommended Posts

Ok I've heard of making VHosts offline, but is it possible to run a vhost online. Like it must be possible. The thing is that I have 1 static ip address. I have 2 different domains for 2 different sites that are hosted on my computer. I can add "A Reccords" on my domains which point to my ip address 142.217.17.58

 

I need it so that each domain points to a different directory within the www folder. I've tried to read various tutorials and none have helped. I need somebody to help me with this.

 

Domains:                                Dir on PC:

www.no-brand.be                      w:/www/nobrand
www.ugamemaker.be                w:/www/ugm

 

What my problem is that I can make the domains act like real domains as in www.no-brand.be/mp3/song.mp3 will allow me to download the file, but I have to have that site in my root directory because the "A Reccord" is pointing to my IP address which is 142.217.17.58

 

I want it to work so that me typing in www.no-brand.be/mp3/song.mp3 will be actually be doing http://142.217.17.58/nobrand/mp3/song.mp3 so what I want is for the domains to look into those DIR folders listed above instead of looking in the server root. I've tried to use virtual hosts, but I have no luck. Can somebody please write some tutorial or short explaination on how to do something like this?

 

 

Thanks!

Share this post


Link to post
Share on other sites

Ok, I have read the stuff and that's what I've been trying to do. I have my virtual host set-up like this:

 

VirtualHost *>
 ServerAdmin bradley@no-brand.be
 DocumentRoot /www/nobrand
 ServerName www.no-brand.be
 ErrorLog logs/nobrand.nl-error_log
 CustomLog logs/nobrand.nl-access_log common
</VirtualHost>

#------

<VirtualHost *>
 ServerAdmin zaboo@ugamemaker.be
 DocumentRoot /www/ugm
 ServerName www.ugamemaker.be
 ErrorLog logs/ugamemaker.nl-error_log
 CustomLog logs/ugamemaker.nl-access_log common
</VirtualHost>

 

Then I go to registerfly.com edit my Advanced DNS settings for those two domains to be something like this:

 

Address (A)

www.no-brand.be -> 142.217.17.58

@.no-brand.be -> 142.217.17.58

*.no-brand.be -> 142.217.17.58

 

Address (A)

 

www.ugamemaker.be -> 142.217.17.58

@.ugamemaker.be -> 142.217.17.58

*.ugamemaker.be -> 142.217.17.58

 

 

I make sure everything is like that. I put it into the virtual hosts and it still gives me nothing. The domains just redirect to the server root and don't even listen to what the virtual hosts is trying to make their document roots to. Any suggesstions?

 

NOTE: I am not using an Administrators Account on Windows 2000.

Share this post


Link to post
Share on other sites

Ok, so I trashed version 3.3 because it's not working for me at all. I changed back to version 3.2a and the virtual hosts are now working! Well kinda!

 

VirtualHost *>
ServerAdmin bradley@no-brand.be
DocumentRoot /www/nobrand
ServerName www.no-brand.be
ErrorLog logs/nobrand.nl-error_log
CustomLog logs/nobrand.nl-access_log common
</VirtualHost>

#------

<VirtualHost *>
ServerAdmin zaboo@ugamemaker.be
DocumentRoot /www/ugm
ServerName www.ugamemaker.be
ErrorLog logs/ugamemaker.nl-error_log
CustomLog logs/ugamemaker.nl-access_log common
</VirtualHost>

 

that's whats in the httpd.conf under the virtual hosts. The problem is that both domains now redirect to /www/nobrand

 

Does anybody have any ideas?

Share this post


Link to post
Share on other sites

Go back to 3.3 and test this:

 

NameVirtualHost *

<VirtualHost *>
ServerAdmin bradley@no-brand.be
DocumentRoot /www/nobrand
ServerName no-brand.be
ErrorLog logs/nobrand.be-error_log
CustomLog logs/nobrand.be-access_log common
</VirtualHost>

#------

<VirtualHost *>
ServerAdmin zaboo@ugamemaker.be
DocumentRoot /www/ugm
ServerName ugamemaker.be
ErrorLog logs/ugamemaker.be-error_log
CustomLog logs/ugamemaker.be-access_log common
</VirtualHost>

 

Try that first and tell me what happens...

 

 

If you are having problems with localhost after that, add this to the end:

 

<VirtualHost *>
  DocumentRoot  /www/
  ServerName  localhost
<VirtualHost>

Share this post


Link to post
Share on other sites

You know what, I'm getting really pissed off with all of these Virtual Hosts. I've tried 3 different WAMP packages, I've tried everything and I'm getting pissed. I did what you said:

 

1. Re-downloaded 3.3

 

2. Added the code you put up top.

 

Results: Every domain uses /www/nobrand/ as it's document root! Localhost isn't working even though I added the code. It seems like my computer is just ignoring the code. Any other ideas?

Share this post


Link to post
Share on other sites

Welcome to the world of servers... you should see what i go through everyday and how i get pissed off.... thats why i lash it on MrX sometimes :lol: :D joking...

 

Attach your httpd.conf file here...

 

Also, make sure that you do not have another server running.. do you/have you by any chance installed Apache, PHP or MySQL seprately using their EXE installers?

 

Try this code:

 

 

NameVirtualHost *:80

<VirtualHost *:80>
ServerAdmin bradley@no-brand.be
DocumentRoot /www/nobrand
ServerName no-brand.be
ErrorLog logs/nobrand.be-error_log
CustomLog logs/nobrand.be-access_log common
</VirtualHost>

#------

<VirtualHost *:80>
ServerAdmin zaboo@ugamemaker.be
DocumentRoot /www/ugm
ServerName ugamemaker.be
ErrorLog logs/ugamemaker.be-error_log
CustomLog logs/ugamemaker.be-access_log common
</VirtualHost>

Share this post


Link to post
Share on other sites

Don't have Apache, PHP, Mysql installed seperatly. I'm on a non-admin account on Windows 2000. That's why I use Uniform Server... no install.

 

tryed the code... same as usuall, everything keeps making /nobrand/ the document root. You know what. I don't need help anymore because I'm just not going to try.

Share this post


Link to post
Share on other sites

"tryed the code... same as usuall, everything keeps making /nobrand/ the document root. You know what. I don't need help anymore because I'm just not going to try. "

 

- I did try what you asked me to put in!

Share this post


Link to post
Share on other sites

A. You are not using the Uniform Server customized httpd.conf file or you are using 3.2a-

 

B. I told you to go back to 3.3

 

C. Here is the problem:

 

#LoadModule vhost_alias_module modules/mod_vhost_alias.so

 

Should be...:

 

LoadModule vhost_alias_module modules/mod_vhost_alias.so

 

What version are you using cause the customized httpd.conf file comes with 3.3 but not the rest... Delete the rest of them so they won't cause any problems... and make sure you are using 3.3!

 

Thanks.

Share this post


Link to post
Share on other sites

Alright, I'm re downloading 3.3 I'm going to try this again...

 

EDIT: Same freakin thing as usual. Both domains redirect to /www/nobrand for some stupid reason.

 

1. I'm now using 3.3

 

2. Check attachments for httpd.conf

 

3. You said to change something when it didn't need to

Copy_of_httpd.txt

Share this post


Link to post
Share on other sites

Alright, guess what that did?

 

Same thing as would have happened if I would have re-installed it.

 

localhost and such works. but now both domains just point to http://142.217.17.58 and still somehow ignore virtual host.

 

 

Let me ask you something. Does virtual host work for you?

Share this post


Link to post
Share on other sites

Yes <_ and others who have tried it.>

 

Try this....:

 

NameVirtualHost *

<VirtualHost *>
ServerName localhost
DocumentRoot /www
</VirtualHost>

<VirtualHost *>
ServerAdmin bradley@no-brand.be
DocumentRoot /www/nobrand
ServerName no-brand.be
ErrorLog logs/nobrand.be-error_log
CustomLog logs/nobrand.be-access_log common
</VirtualHost>

#------

<VirtualHost *>
ServerAdmin zaboo@ugamemaker.be
DocumentRoot /www/ugm
ServerName ugamemaker.be
ErrorLog logs/ugamemaker.be-error_log
CustomLog logs/ugamemaker.be-access_log common
</VirtualHost>

 

BTW: You did not chnage anything else did you? In the httpd.conf file that is? And try looking at the log file for errors....

Share this post


Link to post
Share on other sites

Ok, I have figured out what's wrong... I am on a Windows 2000 non-admin account. It executing something properly. I tried uniform server at my friend's house on his 2000 comp and I had no problems. Oh well, I'll have to wait until I get a new PC.

Share this post


Link to post
Share on other sites

Ok I tryed to re-install my Uniform Server because my MySQL stopped working and re-installing did nothing. Now my virtual hosts don't work again. It must have been something else I had.

 

I had one line with something containing: index.html index.php index.htm

 

Can somebody tell me what that is?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...