Jump to content
The Uniform Server Community

subdomains


gopo
 Share

Recommended Posts

Hi there

 

Although I’m new on this forum, I’ve been playing with uniserver for some time and let me say this: it’s brilliant. Congratulations!

 

I have a problem and hope to get some help.

I’m hosting a domain on my own computer and I need to set up 3 sub domains (at least for now), but it doesn’t seems to work. I had did this with a “regular” Apache without problem.

But uniserver seems to just take the first virtual (sub)domain and use it as it would be the main domain, so all my subdomains and my main domain point to this one.

What’s funny is that the browser shows subdomain.mydomain.dk, but the content is the same for all, including my main domain.

Any idea?

 

I know my explanation it’s not very clear. The point is: how would one set up subdomains? Is there a plug in? :)

 

Thanks

 

gopo

 

P.S. I have little experience with apache and I'm not verry good at this things. I just like to play with php. :)

Link to comment
Share on other sites

I will try and redirect you to this easy tutorials.

 

If it still doesn't work, reply and i will test and write the instructions for you myself.

 

Thanks

 

Tutorials:

http://www.apptools.com/phptools/virtualhost.php

http://tech.irt.org/articles/js160/

http://www.serverwatch.com/news/article.php/1127571

Or check out Google

Link to comment
Share on other sites

  • 2 weeks later...

I’ve spent many hours trying to get uniformServer to serve subdomains. No luck. No matters what, it will ALLAYS serve the folder that is the root (you know, the "www" folder.

 

So I installed the original Apache and configure it to work with my domain (a real domain, not localhost) and with 3 subdomains. It works like a charm. Each subdomain it’s served from the folder assigned in the conf file.

 

So the big question is: why uniformServer uses the same folder (the root one) for all (sub)domains?

 

I must say: I’ve got a lot of experience trying to figure it out and I was happy to have it working with Apache, but what I really want is to have it working with uniformServer.

 

Any thoughts?

 

Olajide => thanks for the tutorials!

Link to comment
Share on other sites

I will look into that more.... did you try testing it with a real domain on the Uniform Server also.... just so we know that localhost is not the problem... I would love it if you cn test it on the Uniform Server with a real domain so that i can narrow things down without having to do much and delaying stuffs :)

 

Thanks

Link to comment
Share on other sites

Well, as I said, I tested with a REAL domain, not localhost. It's my own domain!

You can be sure of that.

 

I really like uniformServer and wanna to use it. I think is the smartest server package I ever see.

 

Thanks!

Link to comment
Share on other sites

Trying adding this mod to Apache and test it to see if it works :)

 

Make sure that you put this in the modules folder and also activate it in the httpd.conf file.

mod_vhost_alias.so

Link to comment
Share on other sites

I just did a first test drive and it's working.

 

At least I didn't get any error and everything's served frim the folder it supose to.

Just have this in mind: it's really late here (01:50) and I might be tired.

I'll test some more tomorrow, just to be on the safe side.

 

Great!

 

Thanks!

 

:)

 

P.S. I forgot to say it before, but I don't think I'm getting email notifications of replies, although I've check that option. Is it just me?

Link to comment
Share on other sites

  • 1 month later...

i put vhost mod online

got in httpd.conf

 

 

 

NameVirtualHost *

<virtualhost *free-hosting.kicks-ass.net:80>

RewriteEngine on

RewriteMap lowercase int:tolower

#RewriteCond %{REQUEST_URI} !^/cgi-bin/

RewriteCond ${lowercase:%{SERVER_NAME}} ^www\.[a-z-]+\.free-hosting\.kicks-ass\.net$

CustomLog W:/own.txt own

RewriteRule ^(.+) ${lowercase:%{SERVER_NAME}}$1 [C]

RewriteRule ^www\.([a-z-]+)\.free-hosting\.kicks-ass\.net/(.*) /home/$1/$2

#ScriptAlias /cgi-bin/ /www/std-cgi/

</virtualhost>

 

 

but it doesn't work (is homeserver could be offline when u try!!)

Link to comment
Share on other sites

First of... you are confusing me badly.....

 

Second, is that domain the domain u used in the httpd.conf file your server domain?

 

Thrid, what do you mean by:

 

but it doesn't work (is homeserver could be offline when u try!!)

 

Sorry if i am hard on you, but i am just tired of people looking for help and not posting the full details or posting it in a manner of understanding for others... :P

Link to comment
Share on other sites

I mean that my homeserver goes down sometimes... :P so if you try you get nothing than a can't connect to server error..

 

i didn't use any other things, only the virtual host section...

 

my virtualhost section

allready tried too add namevirtualhost directives

NameVirtualHost *
NameVirtualHost *free-hosting.kicks-ass.net
NameVirtualHost *bebbet.kicks-ass.net
<virtualhost *bebbet.kicks-ass.net:80>
RewriteCond   %{HTTP_HOST}             ^[^.]+\.bebbet.\kicks-ass\.net$
RewriteRule   ^(.+)                %{HTTP_HOST}$1        [C]
RewriteRule   ^([^.]+)\.bebbet\.kicks-ass\.net(.*) /www/bebbet.kicks-ass.net/$1$2
RewriteLogLevel 10
rewritelog /log.txt
servername *bebbet.kicks-ass.net
</virtualhost>
<virtualhost *free-hosting.kicks-ass.net:80>
RewriteEngine on
RewriteMap   lowercase  int:tolower
#RewriteCond  %{REQUEST_URI}  !^/cgi-bin/
RewriteCond  ${lowercase:%{SERVER_NAME}}  ^www\.[a-z-]+\.free-hosting\.kicks-ass\.net$
CustomLog W:/own.txt own
RewriteRule  ^www\.([a-z-]+)\.free-hosting\.kicks-ass\.net/(.*) /home/$1/$2
RewriteLogLevel 10
rewritelog /log.txt
#ScriptAlias  /cgi-bin/  /www/std-cgi/
</virtualhost>

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...