LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-14-2006, 08:26 AM   #1
tomekf
LQ Newbie
 
Registered: Dec 2005
Posts: 4

Rep: Reputation: 0
Unhappy Dynamic virtual hosting and ulr without www


Hi everyone,

I have a little problem with dynamic subdomains.

This is part of my http.conf

Code:
UseCanonicalName    Off
VirtualDocumentRoot /vhosts/%3+/%2.1/%2.2/%2.3/%2
It's works only for domains with www on the first part ex. www.test.domain.com

It's not working when domain hasn't www in url ex. test.domain.com

Can anybody help me.

Thanks.
 
Old 10-14-2006, 08:35 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Post your virtual hosts configurations from your httpd.conf file or if they are in a separate file, post that.
 
Old 10-14-2006, 09:48 AM   #3
tomekf
LQ Newbie
 
Registered: Dec 2005
Posts: 4

Original Poster
Rep: Reputation: 0
that's all I've got in http.conf about virtual hosts

Code:
UseCanonicalName    Off
VirtualDocumentRoot /vhosts/%3+/%2.1/%2.2/%2.3/%2
 
Old 10-14-2006, 10:28 AM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by tomekf
that's all I've got in http.conf about virtual hosts

Code:
UseCanonicalName    Off
VirtualDocumentRoot /vhosts/%3+/%2.1/%2.2/%2.3/%2
Well that might be the problem then, you need to setup some virtual hosts in your conf file.
 
Old 10-14-2006, 10:45 AM   #5
tomekf
LQ Newbie
 
Registered: Dec 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Can you help me with that ? I would like to have dynamic virtual hosting in /vhosts for 1 domain.

Thx.

EDIT:

I try this, but it isn't works :/

Code:
<VirtualHost *>
ServerName domain.com
ServerAlias *.domain.com
VirtualDocumentRoot /vhost/%0
ErrorLog /var/log/apache/domena-error.log
CustomLog /var/log/apache/domena-access.log full
</VirtualHost>

Last edited by tomekf; 10-14-2006 at 11:39 AM.
 
Old 10-16-2006, 03:10 AM   #6
tomekf
LQ Newbie
 
Registered: Dec 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Question

This is my config

Code:
NameVirtualHost xxx.xxx.xxx.xxx:80

<VirtualHost domain.com>
ServerName domain.com
ServerAlias *.domain.com
VirtualDocumentRoot /vhosts/%3+/%2.1/%2
ErrorLog /var/log/apache/domain-error.log
CustomLog /var/log/apache/domain-access.log full
</VirtualHost>
How should I add

Code:
<VirtualHost  *>
RewriteEngine on
RewriteRule ^(.*)$ http://www.name.domain.com$0 [R]
ServerName name.domain.com
</VirtualHost>
to changing url in web browser ?
 
  


Reply



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
dynamic IP/web hosting microsoft/linux Linux - Networking 1 09-25-2005 01:54 PM
need help about dynamic hosting alvi2 Linux - Networking 2 05-05-2005 10:58 AM
Mandrake 9.2, hosting web page behind router on dynamic ip c_mitulescu Linux - Networking 5 01-05-2004 06:59 PM
Hosting dynamic DNS Kostko Linux - Networking 6 12-15-2002 04:45 AM
Problems With Apache & Virtual Hosting Using Dynamic DNS moetjojo Linux - Networking 7 12-02-2002 04:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:27 AM.

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
Open Source Consulting | Domain Registration