Jump to content
The Uniform Server Community

Virtual hosts?


elyk
 Share

Recommended Posts

Is there a way to setup virtual hosts so that I could, for example, have the server show one director when accessed from mydomain.com, and a different directory if accessed from example.com?

Link to comment
Share on other sites

Yes. You can set up a Virtual Host. Alleykat sent me a script that can do this.. which will be added to the Pro version of the Admin Panel when it comes out.

 

If you would like it, i can send it to you but beware cause i have not yet test it out. You can always ask AlleyKat for more information. :D

Link to comment
Share on other sites

I have no idea. Currently i am working on the Lite version because as soon as Taras fixes the Process32 bug which is delaying the 3.3 release, we have to make a quick release and the Lite version should at least be in beta by then, but as for the Pro version, I have no idea.

Link to comment
Share on other sites

Damn.. took me 2hrs to get it setup with the new Amdin Panel. Adding the language system integration and removing unneeded things i know of... (while watching T.V.) :)

 

:D

Link to comment
Share on other sites

nah... That was the Admin Panel 2.0

I am currently working on the Lite version of it to release with 3.3 as soon as Taras fixes the Process32 bug. There will be no delay whatsoever...

The Admin Panel is also still in development and no one has it yet. :D

Link to comment
Share on other sites

By the way, did you ever get the VHost script AlleyKat was talkign about to work the way it is suppose too... I tried it but did not work well.. just referred me to the default /www/ even though the httpd.conf was chnaged and updated..... Did you try it with a domain also?

Link to comment
Share on other sites

I haven't tried it yet; I was waiting to wait for the admin panel with it to be released, but seeing as there's no release date...I'm going to pm alleykat

EDIT: I just remembered that I had used another server before with these capabilties. Does it involve making an entry to the .conf file that looks something like this?:

VirtualHost:*domain*:webdir=*directory*

Then if you want to have separate settings you make another .conf file named after the virtual domain that's almost identical to the main .conf file? Or is that just specific to that webserver? The server was zouminiwebserver.

Link to comment
Share on other sites

Alleykat's script works perfect. Try it... but i do think that Apache has aproblem with creating VHost on localhost cause it only redirects you to the /www/ folder as you stated :)

Link to comment
Share on other sites

could you send me the script with a short explanation of how it works? I sent Alleykat a pm a couple of days ago and haven't got a response back. My email is elyk53 at gmail dot com

Thanks

Link to comment
Share on other sites

thanks. I figured out how to use it and it seems to work. But it tells me on the side, under the list of hosts,

Error in hosts file:

localhost:80 does not exist

Is this a problem or is it just confused?
Link to comment
Share on other sites

  • 1 month later...

made a vhost using the script

bebbet.testhost

 

httpd.conf snipplet:

 

<VirtualHost *>

ServerName bebbet.testhost

DocumentRoot W:/www/aa1/

</VirtualHost>

 

but i still get too w:/www/aa/ (i got index.php in /www/ wich redicts to /aa/)

so...?! someone knows how to solve this problem?>

 

*i allready enabled mod_vhost_alias

 

*

#LoadModule usertrack_module modules/mod_usertrack.so

LoadModule vhost_alias_module modules/mod_vhost_alias.so

#LoadModule ssl_module modules/mod_ssl.so

*

Link to comment
Share on other sites

I am confused by your post... what do u mean, ofcourse it is suppose to link you to the W:/www/aa1 folder because that is what you set :P

 

What do you mean:

 

i got index.php in /www/ wich redicts to /aa/

 

Also i hope you have the .so file in the modules folder of Apache?

Link to comment
Share on other sites

i got the server

 

W:/www/ the root, if someone gets in the root (so not subdirs) i got PHP script:

 

header(location: /aa/)

 

so that it redicts to

 

W:/www/aa/

 

my main site (i didn't want it in the root...)

but if i try to pass trough the virtual host i only get to that location

Link to comment
Share on other sites

If you have mod_vhost_alias activated with the module in the Apache Module folder, it is suppose to work.

 

Here is what i want you tod o to ensure i am able to help you right, i want you to paste the vhost setting here from the httpd.conf file.

 

From what i understand you are trying to make a vhost but it redirects to the W:/www/ folder so you put PHP file there to redirect to W:/www/aa/, am i right? :P

 

Thanks

Link to comment
Share on other sites

Try this and put the rest of the codes that are not here but you want in a .htaccess file under the folder after this is working...

 

<VirtualHost *>
   ServerAdmin webmaster@bebbet.kicks-ass.net
   DocumentRoot /www/bebbet
   ServerName bebbet.kicks-ass.net
   ErrorLog logs/bebbet.kicks-ass.net-error_log
   CustomLog logs/bebbet.kicks-ass.net-access_log common
</VirtualHost>

#------

<VirtualHost *>
   ServerAdmin webmaster@free-hosting.kicks-ass.net
   DocumentRoot /www/free-hosting
   ServerName free-hosting.kicks-ass.net
   ErrorLog logs/free-hosting.kicks-ass.net-error_log
   CustomLog logs/free-hosting.kicks-ass.net-access_log common
</VirtualHost>

 

Try that, make sure that the domain names are set to go to your ip on the pc that the server is on or you can use the vhost script here to make the virtual host... I do not know where you got your own version of the code from but i am absolutly sure that it is buggy and will never work because you do not have most of the needed things set.

 

Put that code in the httpd.conf file, just that code alone, nothing added and test it... make sure the domain is also pointing to the server or edit your windows http file to redirect all calls to localhost...

Link to comment
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...
 Share

×
×
  • Create New...