XAMP multiple "sub domain/virtual host" not working

Problems with the Windows version of XAMPP, questions, comments, and anything related.

XAMP multiple "sub domain/virtual host" not working

Postby obayda1757 » 11. February 2014 12:18

Dear Friends,
I have created 2 sub-domin on my name server. And forward these to my OWN server(public ip). Now I have to configure my Local Server for virtual hosting.
My subdomins are:
a) opinion.dscebd.org ---> need to forward to "d:\xamp\htdocs\dsceopn"
b) library.dscebd.org ---> need to forward to "d:\xamp\htdocs\dsce"

I have already edited 3 following files as per different examples. Also add the code of these files here. But virtual hosting is not working.
1) host (sytem32) 2) httpd.conf (apache) 3) httpd-vhost.conf (apache)
Please help me to configure these files.

File#1) HOST FILE: (Location: C:\Windows\System32\drivers\etc\host)
Code: Select all
#   127.0.0.1       localhost
127.0.0.1 opinion.dscebd.org
127.0.0.1 library.dscebd.org


File# 2) httpd.conf (location: D:\xampp\apache\conf\httpd.conf)
Code: Select all
#Listen 12.34.56.78:80
Listen 80
ServerName localhost:80
 #ServerName 180.234.212.27:80                                // My Server Real IP
#ServerName 192.168.2.11:80                                   // My server's Local IP

DocumentRoot "D:/xampp/htdocs"
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

# Virtual hosts
Include conf/extra/httpd-vhosts.conf   


File# 3) httpd-vhosts.conf (location: D:\xampp\apache\conf\extra\httpd-vhosts.conf)
Code: Select all
## My Local Host ##
<VirtualHost *:80>
    ServerName localhost
    DocumentRoot D:\xampp\htdocs
</VirtualHost>

## My 1st Domain(sub-domain) ##
<VirtualHost *:80>
    ServerName library.dscebd.org
    ServerAlias http://library.dscebd.org/
    DocumentRoot "D:\xampp\htdocs\dsce"
</VirtualHost>

## My 2nd Domain(sub-domain) ##
<VirtualHost *:80>
    ServerName opinion.dscebd.org/
    ServerAlias http://opinion.dscebd.org
    DocumentRoot "D:\xampp\htdocs\dsceopn"
</VirtualHost>
obayda1757
 
Posts: 6
Joined: 11. February 2014 11:17
XAMPP Version: 1.7.4
Operating System: Windows, Ubuntu

Re: XAMP multiple "sub domain/virtual host" not working

Postby Altrea » 11. February 2014 14:24

Hi obayda1757,

ServerName and ServerAlias should not contain any information about protocol, slashes, subdirectories, etc.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6697
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: XAMP multiple "sub domain/virtual host" not working

Postby obayda1757 » 12. February 2014 07:36

Jajaka Allah
THANK YOU ALL
Almighty will give good rewards and hedayah to you all for your great effort to solve this issue.
Its being so difficult for us to get such support as we are living in third world
obayda1757
 
Posts: 6
Joined: 11. February 2014 11:17
XAMPP Version: 1.7.4
Operating System: Windows, Ubuntu

Re: XAMP multiple "sub domain/virtual host" not working

Postby obayda1757 » 15. February 2014 11:41

But my "word press sites" links are not working

You can easily check the problem from live
site link: http://opinion.dscebd.org/
obayda1757
 
Posts: 6
Joined: 11. February 2014 11:17
XAMPP Version: 1.7.4
Operating System: Windows, Ubuntu

Re: XAMP multiple "sub domain/virtual host" not working

Postby Altrea » 15. February 2014 11:55

live environment & third party application
=> [INFO] How to not fail getting help here (section "Scope of support")
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6697
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: XAMP multiple "sub domain/virtual host" not working

Postby Nobbie » 15. February 2014 13:48

It seems, that you installed WordPress under localhost, then created subdomain opinion.dscebd.org and finally moved your existing WordPress Installation from localhost to opinion.dscebd.org.

THIS DOES NOT WORK!!

You have to create all subdomains and folders first and finally you have to install WordPress into the desired subdomain and provide the appropriate informations into the WordPress Installer Dialog. You cannot move an existing WordPress Installation from one domain to another.
Nobbie
 
Posts: 6797
Joined: 09. March 2008 13:04

Re: XAMP multiple "sub domain/virtual host" not working

Postby Altrea » 15. February 2014 14:16

We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6697
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: XAMP multiple "sub domain/virtual host" not working

Postby Nobbie » 15. February 2014 21:25

Altrea wrote:You can, but you have to know what to change


--- was mir natürlich auch klar ist, aber das schafft obydaya1757 mit absoluter Sicherheit erst Recht nicht. Außerdem ist sein Server nackt bis zum geht nicht mehr, er hat wirklich Xampp im Originalzustand dort installiert (ich kann problemlos die Xampp Adminoberfläche aufrufen).

Ich schreibe das alles bewusst auf Deutsch, weil mir obydaya157 zum einen natürlich Leid tut, zum anderen muss man (= Du .....) ihm beibringen, dass man Xampp nicht einfach so Online einsetzen kann. Im Moment kann man mit ein wenig Phantasie (und sehr viel braucht man wirklich nicht) auf die Xampp Adminoberfläche (inkl. MySQL mit "root" ohne Passwort..... :shock: :shock: :shock: :shock: ) von außen zugreifen (und deswegen schreibe ich auf Deutsch, damit nicht irgendwelche Idioten das aus Versehen verstehen).
Nobbie
 
Posts: 6797
Joined: 09. March 2008 13:04

Re: XAMP multiple "sub domain/virtual host" not working

Postby obayda1757 » 16. February 2014 07:43

@Nobbie
--- was mir natürlich auch klar ist, aber das schafft obydaya1757 mit absoluter Sicherheit erst Recht nicht. Außerdem ist sein Server nackt bis zum geht nicht mehr, er hat wirklich Xampp im Originalzustand dort installiert (ich kann problemlos die Xampp Adminoberfläche aufrufen).


vielen Dank für die Anregung. Ich bin mit der Website für die Test arbeiten. Aber du meine Augen zu öffnen für die Sicherheit

English: thanks a lot for the suggestion. I am working with the site for test. But you open my eyes for security
obayda1757
 
Posts: 6
Joined: 11. February 2014 11:17
XAMPP Version: 1.7.4
Operating System: Windows, Ubuntu

Re: XAMP multiple "sub domain/virtual host" not working

Postby obayda1757 » 17. February 2014 09:11

Alhamdulillah!!
After all by the grace of Almighty Allah may be I have successfully implemented my Virtual Hosting and Web transformation.
Thank you all. With whose support help me to learn the guideline to implementation.

I have made a tutorial for the new comers in Web like me to know about
Virtual Hosting (in public domain) and Web site transformation

http://goo.gl/w0V9rw
obayda1757
 
Posts: 6
Joined: 11. February 2014 11:17
XAMPP Version: 1.7.4
Operating System: Windows, Ubuntu

Re: XAMP multiple "sub domain/virtual host" not working

Postby Altrea » 17. February 2014 17:32

I can not recommend to follow this tutorial
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6697
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64


Return to XAMPP for Windows

Who is online

Users browsing this forum: lse123 and 46 guests