LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 06-04-2008, 09:03 AM   #1
mohan.aturheart
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Rep: Reputation: 0
Access any sub domain urls gets map to one subdomain


For the security reason i am not able to given my domain name. So i am explain the problems with other examples. I have a domain in the name of https://mohan.com. I am created website for the sub domain https://abc.mohan.com. I am also created other websites in the name of https://mno.mohan.com, https://xyz.mohan.com when i am accessing the https://mno.mohan.com i can get the website pages other than if i am browse without the ssl value http://mno.mohan.com (or) http://xyz.mohan.com I am get to the website http://abc.mohan.com. So i am not able to find the solution. Any one please help me?
 
Old 06-06-2008, 07:56 AM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
You probably don't (all) have virtual hosts defined for the http sites and only for the https sites. With a server configured as below, requests for e.g. site3.btd-techweb02 will show the page for btd-techweb02 (the first virtual host).
Code:
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

# catch-all
<VirtualHost *:80>
    ServerAdmin a@b.c
    DocumentRoot /srv/httpd/htdocs
    ServerName btd-techweb02
</VirtualHost>

# site 1
<VirtualHost *:80>
    ServerAdmin a@b.c
    DocumentRoot /home/wim/www/site1/web
    ServerName site1.btd-techweb02
    ErrorLog /var/log/httpd/error_log
    CustomLog /var/log/httpd/access_log common

#WimS
# this is required to prevent message 403 "Forbidden"
    <Directory "/home/wim/www/site1/web">
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

# site2
<VirtualHost *:80>
    ServerAdmin a@b.c
    DocumentRoot /home/wim/www/site2/web
    ServerName site2.btd-techweb02
    ErrorLog /var/log/httpd/error_log
    CustomLog /var/log/httpd/access_log common

#WimS
# this is required to prevent message 403 "Forbidden"
    <Directory "/home/wim/www/site2/web">
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
PS How is this a programming question ?

Last edited by Wim Sturkenboom; 06-06-2008 at 07:57 AM. Reason: Added PS
 
Old 07-01-2008, 07:19 AM   #3
mohan.aturheart
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Original Poster
Rep: Reputation: 0
still i am facing the same problem

Quote:
Originally Posted by Wim Sturkenboom View Post
You probably don't (all) have virtual hosts defined for the http sites and only for the https sites. With a server configured as below, requests for e.g. site3.btd-techweb02 will show the page for btd-techweb02 (the first virtual host).
Code:
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

# catch-all
<VirtualHost *:80>
    ServerAdmin a@b.c
    DocumentRoot /srv/httpd/htdocs
    ServerName btd-techweb02
</VirtualHost>

# site 1
<VirtualHost *:80>
    ServerAdmin a@b.c
    DocumentRoot /home/wim/www/site1/web
    ServerName site1.btd-techweb02
    ErrorLog /var/log/httpd/error_log
    CustomLog /var/log/httpd/access_log common

#WimS
# this is required to prevent message 403 "Forbidden"
    <Directory "/home/wim/www/site1/web">
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

# site2
<VirtualHost *:80>
    ServerAdmin a@b.c
    DocumentRoot /home/wim/www/site2/web
    ServerName site2.btd-techweb02
    ErrorLog /var/log/httpd/error_log
    CustomLog /var/log/httpd/access_log common

#WimS
# this is required to prevent message 403 "Forbidden"
    <Directory "/home/wim/www/site2/web">
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
PS How is this a programming question ?
Thanks for your reply && sorry for the late reply
 
Old 07-08-2008, 12:42 PM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Time to post the relevant parts of your apache configuration
 
  


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
How to I map domain name to my linux server?? niner710 Linux - Newbie 11 05-20-2008 12:50 PM
Running what on Server to map domain to IP ? anjanesh Linux - General 4 07-11-2006 05:43 AM
Try it out: Cannot access any sites with hypens in the subdomain. StevenO Linux - Networking 3 01-31-2006 01:47 AM
Yet another apache domain/subdomain problem xtra Linux - Newbie 2 08-18-2004 07:30 AM
Domain and subdomain macadam Linux - Newbie 2 09-18-2003 04:00 PM


All times are GMT -5. The time now is 10:57 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration