Creating a subdomain..?

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

Creating a subdomain..?

Postby tilleritova » 13. June 2006 13:17

Hi...
I need a step by step assistance to make subdomain for my Webserver.
Can anyone guide me how to do that?

my domain name is stoll.nu

Thanks!
tilleritova
 
Posts: 19
Joined: 30. May 2006 20:04
Location: Östersund

Postby deepsurfer » 13. June 2006 16:21

OK.. i see you are using XAMPP 1.5.2 for Windows

at first, i understand with "subdomain" this call -->
sub1.stoll.nu
sub2.stoll.nu

second, make of all work a backup, if anything dont work you can in seconds bring back you server to the normal level !

excuse me, i dont know the exact path of you server, you need to change it for yourself.

Edit the httpd.conf, find the line
#Include /conf/extra/httpd-vhost.conf
delete the " # " , saving.

now edit the \xampp\apache\conf\extra\httpd-vhost.conf

COPY/PASTE from here all lines into the end of the httpd-vhost.conf

Code: Select all
NameVirtualHost *:80
#This is the first VHOST for you content stoll.nu
#change the path to your pathes of content
<VirtualHost *:80>
    ServerName stoll.nu
    ServerAlias www.stoll.nu
    ServerAdmin webmaster@stoll.nu
    DocumentRoot c:/xampp/htdocs/stollnu/
<Directory "c:/xampp/htdocs/stollnu">
        AllowOverride All
        Options IncludesNoExec
        Order allow,deny
        Allow from all
</Directory>
</VirtualHost>

#This is the first SUBdomain with his own Path for content
<VirtualHost *:80>
    ServerName sub1.stoll.nu
    ServerAlias www.sub1.stoll.nu
    ServerAdmin webmaster@stoll.nu
    DocumentRoot c:/xampp/htdocs/sub1stollnu/
<Directory "c:/xampp/htdocs/sub1stollnu">
        AllowOverride All
        Options IncludesNoExec
        Order allow,deny
        Allow from all
</Directory>
</VirtualHost>

#This ist the next SUBdomain with own Path of content
<VirtualHost *:80>
    ServerName sub2.stoll.nu
    ServerAlias www.sub2.stoll.nu
    ServerAdmin webmaster@stoll.nu
    DocumentRoot c:/xampp/htdocs/sub2stollnu/
<Directory "c:/xampp/htdocs/sub2stollnu">
        AllowOverride All
        Options IncludesNoExec
        Order allow,deny
        Allow from all
</Directory>
</VirtualHost>


Usefull Thinks:
If you have LOGfile enable, COPY the logfile generation from you httpd.conf and PASTE it in your VHOST (below the DocumentRoot xxxx)
Seperate for any VHOST (SubDomain) with his own logfilename or logfilepath or both.

After editing the httpd-vhost.conf and the httpd.conf you must restart the XAMPP-Apache.
If he dont start, the first think are aviable.
- Any Pathes in the VHOST are incorect or missing

But the startscript must write whats wrong

If you have no time to fix, bring back the backup of httpd.conf and start XAMPP-Apache that your content is aviable.

hope my english is good enough to understand me.

chirio
Deep
User avatar
deepsurfer
AF Moderator
 
Posts: 6440
Joined: 23. November 2004 10:44
Location: Cologne
Operating System: Win-XP / Win7 / Linux -Debian

Postby tilleritova » 13. June 2006 17:11

when i do what you said i´ll get Error 403 Access denied

my httpd-vhosts file looks like this:

Code: Select all
# Use name-based virtual hosting.
#
##NameVirtualHost *:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
##<VirtualHost *:80>
##    ServerAdmin webmaster@dummy-host.example.com
##    DocumentRoot /www/docs/dummy-host.example.com
##    ServerName dummy-host.example.com
##    ServerAlias www.dummy-host.example.com
##    ErrorLog @rel_logfiledir@/dummy-host.example.com-error_log
##    CustomLog @rel_logfiledir@/dummy-host.example.com-access_log common
##</VirtualHost>

##<VirtualHost *:80>
##    ServerAdmin webmaster@dummy-host2.example.com
##    DocumentRoot /www/docs/dummy-host2.example.com
##    ServerName dummy-host2.example.com
##    ErrorLog @rel_logfiledir@/dummy-host2.example.com-error_log
##    CustomLog @rel_logfiledir@/dummy-host2.example.com-access_log common
##</VirtualHost>

#This is the first SUBdomain with his own Path for content
<VirtualHost *:80>
    ServerName sub1.stoll.nu
    ServerAlias www.sub1.stoll.nu
    ServerAdmin webmaster@stoll.nu
    DocumentRoot c:/program/xampp/htdocs/sub1stollnu/
<Directory "c:/program/xampp/htdocs/sub1stollnu/">
        AllowOverride All
        Options IncludesNoExec
        Order allow,deny
        Allow from all
</Directory>
</VirtualHost>


i have aslo tried all the lives you told me to put in... same thing Error 403 access denied

and the errorlog:

[Tue Jun 13 18:09:23 2006] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Tue Jun 13 18:09:23 2006] [notice] Child 5940: Exit event signaled. Child process is ending.
[Tue Jun 13 18:09:24 2006] [notice] Child 5940: Released the start mutex
[Tue Jun 13 18:09:25 2006] [notice] Child 5940: Waiting for 250 worker threads to exit.
[Tue Jun 13 18:09:26 2006] [notice] Child 5940: All worker threads have exited.
[Tue Jun 13 18:09:26 2006] [notice] Child 5940: Child process is exiting
[Tue Jun 13 18:09:26 2006] [notice] Parent: Child process exited successfully.
[Tue Jun 13 18:09:36 2006] [notice] Apache/2.2.0 (Win32) DAV/2 mod_ssl/2.2.0 OpenSSL/0.9.8a mod_autoindex_color PHP/5.1.2 configured -- resuming normal operations
[Tue Jun 13 18:09:36 2006] [notice] Server built: Dec 1 2005 18:36:53
[Tue Jun 13 18:09:36 2006] [notice] Parent: Created child process 3060
[Tue Jun 13 18:09:37 2006] [notice] Child 3060: Child process is running
[Tue Jun 13 18:09:37 2006] [notice] Child 3060: Acquired the start mutex.
[Tue Jun 13 18:09:37 2006] [notice] Child 3060: Starting 250 worker threads.
[Tue Jun 13 18:09:37 2006] [notice] Child 3060: Starting thread to listen on port 443.
[Tue Jun 13 18:09:37 2006] [notice] Child 3060: Starting thread to listen on port 80.
[Tue Jun 13 18:09:50 2006] [error] [client 83.227.184.134] (20023)The given path was above the root path: Cannot map GET / HTTP/1.1 to file
[Tue Jun 13 18:09:50 2006] [error] [client 83.227.184.134] (20023)The given path was above the root path: Cannot map GET / HTTP/1.1 to file
[Tue Jun 13 18:09:50 2006] [error] [client 83.227.184.134] (20023)The given path was above the root path: Cannot map GET / HTTP/1.1 to file
[Tue Jun 13 18:09:50 2006] [error] [client 83.227.184.134] (20023)The given path was above the root path: Cannot map GET / HTTP/1.1 to file
[Tue Jun 13 18:09:50 2006] [error] [client 83.227.184.134] (20023)The given path was above the root path: Cannot map GET / HTTP/1.1 to file
[Tue Jun 13 18:09:50 2006] [error] [client 83.227.184.134] (20023)The given path was above the root path: Cannot map GET / HTTP/1.1 to file
[Tue Jun 13 18:09:50 2006] [error] [client 83.227.184.134] (20023)The given path was above the root path: Cannot map GET / HTTP/1.1 to file
[Tue Jun 13 18:09:50 2006] [error] [client 83.227.184.134] (20023)The given path was above the root path: Cannot map GET / HTTP/1.1 to file
[Tue Jun 13 18:09:50 2006] [error] [client 83.227.184.134] (20023)The given path was above the root path: Cannot map GET / HTTP/1.1 to file
tilleritova
 
Posts: 19
Joined: 30. May 2006 20:04
Location: Östersund

Postby deepsurfer » 13. June 2006 23:09

Sorry, but i wrote

"""COPY/PASTE from here all lines into the end of the httpd-vhost.conf"""


why you dont doing that ????????

you only change the correct pathes to your content folders, not any more.

If you ony use one subdomain, delete the third VHOST entry (sub2.stoll.nu) and now you have a VHOST function with the main-content and in addition the sub1.stoll.nu

I hope you understand that the words "sub1" and "sub2" for your own choice of the subdomain-name is.

Hind:
The Apache works at this time with VHOST, the first VHOST ist the "mother" of the Server and build your main-content.
When a request can't resolved from apache, the apache jump to the first VHOST.

I write it with this Lines:
#This is the first VHOST for your content stoll.nu
#change the path to your pathes of content



Sorry, i will help, but User (you to) doing anything else, not what i write to help.....
If this my destiny, i going back into the german forum....
chirio Deep
Wie sagte einst der MCP aus Tron auf dem Bildschirm zu schreiben Pflegte
" ... end of communication ... "
User avatar
deepsurfer
AF Moderator
 
Posts: 6440
Joined: 23. November 2004 10:44
Location: Cologne
Operating System: Win-XP / Win7 / Linux -Debian

Postby tilleritova » 14. June 2006 07:22

Well i wrote that i have done that as well but i still get error 403 Access denied.
And i have removed the # from Include /conf/extra/httpd-vhost.conf
Now my httpd-vhost looks like this:

Code: Select all
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
##NameVirtualHost *:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
##<VirtualHost *:80>
##    ServerAdmin webmaster@dummy-host.example.com
##    DocumentRoot /www/docs/dummy-host.example.com
##    ServerName dummy-host.example.com
##    ServerAlias www.dummy-host.example.com
##    ErrorLog @rel_logfiledir@/dummy-host.example.com-error_log
##    CustomLog @rel_logfiledir@/dummy-host.example.com-access_log common
##</VirtualHost>

##<VirtualHost *:80>
##    ServerAdmin webmaster@dummy-host2.example.com
##    DocumentRoot /www/docs/dummy-host2.example.com
##    ServerName dummy-host2.example.com
##    ErrorLog @rel_logfiledir@/dummy-host2.example.com-error_log
##    CustomLog @rel_logfiledir@/dummy-host2.example.com-access_log common
##</VirtualHost>

NameVirtualHost *:80
#This is the first VHOST for you content stoll.nu
#change the path to your pathes of content
<VirtualHost *:80>
    ServerName stoll.nu
    ServerAlias www.stoll.nu
    ServerAdmin webmaster@stoll.nu
    DocumentRoot c:/program/xampp/htdocs/
<Directory "c:/program/xampp/htdocs/">
        AllowOverride All
        Options IncludesNoExec
        Order allow,deny
        Allow from all
</Directory>
</VirtualHost>

#This is the first SUBdomain with his own Path for content
<VirtualHost *:80>
    ServerName sub1.stoll.nu
    ServerAlias www.sub1.stoll.nu
    ServerAdmin webmaster@stoll.nu
    DocumentRoot c:/program/xampp/htdocs/sub1stollnu/
<Directory "c:/program/xampp/htdocs/sub1stollnu">
        AllowOverride All
        Options IncludesNoExec
        Order allow,deny
        Allow from all
</Directory>
</VirtualHost>

#This ist the next SUBdomain with own Path of content
<VirtualHost *:80>
    ServerName sub2.stoll.nu
    ServerAlias www.sub2.stoll.nu
    ServerAdmin webmaster@stoll.nu
    DocumentRoot c:/program/xampp/htdocs/sub2stollnu/
<Directory "c:/program/xampp/htdocs/sub2stollnu">
        AllowOverride All
        Options IncludesNoExec
        Order allow,deny
        Allow from all
</Directory>
</VirtualHost>


and yes i know that sub2stollnu is a folder and i have that folder just to test if this works

and my error log looks like this:

[Wed Jun 14 08:15:24 2006] [error] [client 66.249.72.35] File does not exist: C:/Program/xampp/htdocs/robots.txt
[Wed Jun 14 08:15:52 2006] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Wed Jun 14 08:15:52 2006] [notice] Child 3312: Exit event signaled. Child process is ending.
[Wed Jun 14 08:15:53 2006] [notice] Child 3312: Released the start mutex
[Wed Jun 14 08:15:54 2006] [notice] Child 3312: Waiting for 250 worker threads to exit.
[Wed Jun 14 08:15:56 2006] [notice] Child 3312: All worker threads have exited.
[Wed Jun 14 08:15:56 2006] [notice] Child 3312: Child process is exiting
[Wed Jun 14 08:15:58 2006] [notice] Parent: Child process exited successfully.
[Wed Jun 14 08:16:19 2006] [notice] Apache/2.2.0 (Win32) DAV/2 mod_ssl/2.2.0 OpenSSL/0.9.8a mod_autoindex_color PHP/5.1.2 configured -- resuming normal operations
[Wed Jun 14 08:16:20 2006] [notice] Server built: Dec 1 2005 18:36:53
[Wed Jun 14 08:16:20 2006] [notice] Parent: Created child process 5780
[Wed Jun 14 08:16:22 2006] [notice] Child 5780: Child process is running
[Wed Jun 14 08:16:22 2006] [notice] Child 5780: Acquired the start mutex.
[Wed Jun 14 08:16:22 2006] [notice] Child 5780: Starting 250 worker threads.
[Wed Jun 14 08:16:22 2006] [notice] Child 5780: Starting thread to listen on port 443.
[Wed Jun 14 08:16:22 2006] [notice] Child 5780: Starting thread to listen on port 80.
[Wed Jun 14 08:16:22 2006] [error] [client 83.227.184.134] (20023)The given path was above the root path: Cannot map GET / HTTP/1.1 to file
[Wed Jun 14 08:16:23 2006] [error] [client 83.227.184.134] (20023)The given path was above the root path: Cannot map GET / HTTP/1.1 to file
[Wed Jun 14 08:16:23 2006] [error] [client 83.227.184.134] (20023)The given path was above the root path: Cannot map GET / HTTP/1.1 to file
[Wed Jun 14 08:16:23 2006] [error] [client 83.227.184.134] (20023)The given path was above the root path: Cannot map GET / HTTP/1.1 to file
[Wed Jun 14 08:16:23 2006] [error] [client 83.227.184.134] (20023)The given path was above the root path: Cannot map GET / HTTP/1.1 to file
[Wed Jun 14 08:16:23 2006] [error] [client 83.227.184.134] (20023)The given path was above the root path: Cannot map GET / HTTP/1.1 to file
[Wed Jun 14 08:16:23 2006] [error] [client 83.227.184.134] (20023)The given path was above the root path: Cannot map GET / HTTP/1.1 to file
[Wed Jun 14 08:16:23 2006] [error] [client 83.227.184.134] (20023)The given path was above the root path: Cannot map GET / HTTP/1.1 to file
[Wed Jun 14 08:16:24 2006] [error] [client 83.227.184.134] (20023)The given path was above the root path: Cannot map GET / HTTP/1.1 to file
tilleritova
 
Posts: 19
Joined: 30. May 2006 20:04
Location: Östersund

Postby deepsurfer » 14. June 2006 10:01

error.log wrote:The given path was above the root path: Cannot map GET / HTTP/1.1 to file


Please check the foldernames, this message say me, that any wrong with Pathes.


EDIT: i see that you content ist still down..
editing httpd.conf
In the line
Include /conf/extra/httpd-vhost.conf
make a "#" before, save, restart xampp-apache

now your content is aviable.

If you checkt your httpd-vhost.conf (any edits), then edit the httpd.conf delete this "#" and start xampp-apache.

Now with this guide, you know that your content ist online and you have time to check messages.
Its nasty, but with this your timeout of content is relatively small
chirio Deep
Wie sagte einst der MCP aus Tron auf dem Bildschirm zu schreiben Pflegte
" ... end of communication ... "
User avatar
deepsurfer
AF Moderator
 
Posts: 6440
Joined: 23. November 2004 10:44
Location: Cologne
Operating System: Win-XP / Win7 / Linux -Debian

Postby tilleritova » 14. June 2006 14:35

I have tried that now and with the # infromt my pages work.
I have checked the path and it is correct... but i still get Error 403 Access Denied

:cry:
tilleritova
 
Posts: 19
Joined: 30. May 2006 20:04
Location: Östersund

Postby deepsurfer » 14. June 2006 14:49

have you inside c:/program/xampp/htdocs/ any .htaccess Files ????


I find message related to error.log with " LIMIT GET " options
chirio Deep
Wie sagte einst der MCP aus Tron auf dem Bildschirm zu schreiben Pflegte
" ... end of communication ... "
User avatar
deepsurfer
AF Moderator
 
Posts: 6440
Joined: 23. November 2004 10:44
Location: Cologne
Operating System: Win-XP / Win7 / Linux -Debian

Postby tilleritova » 14. June 2006 15:06

yes i have a .htaccess file with my error 401 and error 404 info in the htdocs folder
but i have a lot .htaccess files inte other folders under htdocs
tilleritova
 
Posts: 19
Joined: 30. May 2006 20:04
Location: Östersund

possible?

Postby sl_ime » 15. June 2006 09:05

is there a possibility of implementing it on windows?
User avatar
sl_ime
 
Posts: 5
Joined: 22. April 2006 12:34

Postby tilleritova » 15. June 2006 09:27

is there a possibility of implementing it on windows?


what do you mean!?
tilleritova
 
Posts: 19
Joined: 30. May 2006 20:04
Location: Östersund

Postby sl_ime » 15. June 2006 09:43

it was answered thanks.
User avatar
sl_ime
 
Posts: 5
Joined: 22. April 2006 12:34

Postby tilleritova » 15. June 2006 19:38

Ok...

I ask the question again? why can´t i get the subdomains to work?!

Can anyone please help me..!??
tilleritova
 
Posts: 19
Joined: 30. May 2006 20:04
Location: Östersund

Postby tilleritova » 16. June 2006 10:19

I have heard that the problem with subdomains i have is a common problem that occurs with Xampp users?

Are there any developers och Experts that can solve this problem form me?
tilleritova
 
Posts: 19
Joined: 30. May 2006 20:04
Location: Östersund

Postby tilleritova » 16. June 2006 12:51

ok... yet a new question!?

Do i need to add to my DNS that the subdomain must go to my ipadress?

example: if i set sub1.stoll.nu on my server as above. do i need to set an A record to my domain name?
tilleritova
 
Posts: 19
Joined: 30. May 2006 20:04
Location: Östersund

Next

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 76 guests