Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Creating your own subdomain xampp

Joined
Jul 31, 2012
Messages
490
Reaction score
93
Surely you ever wanted to create a subdomain for your web server. I decided to give you guidance.

Tested for XAMPP 1.7.1 and 1.7.3

You need access to modify the CNAME for your domain, it can be found in the DNS settings.

Add the CNAME record

Name => name of your subdomain (Forum, hard, Graz ...)

TTL => 86400 (or settings of your service provider)

Value => your current domain ( it is sometimes necessary for the domain enter "." dot )

Record type => CNAME

DNS change will take effect within 24 hours from saving changes.
(Free may help set this record and your domain administrator)

Now we have set up DNS entries for your domain and you are ready to setup our web server.
Open the folder where you installed the Web server and create a folder named htdocs_sub.

Now open the folder apache.
Here, open the folder conf folder and then extra.
Find the file httpd-vhosts and open it in Notepad

Add the following entry

PHP:
NameVirtualHost *:80

#Adjusting for the main domain
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/"
ServerName localhost
</VirtualHost>

#Setting subdomain
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs_sub/"
# The name of your actual subdomain
ServerName test.projekt-web.cz
</VirtualHost>

#Setting permissions subdomains
<Directory "C:/xampp/htdocs_sub">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>

Save the file and restart your apache.

The next step is to set the hosts file, which can be found

\Windows\System32\drivers\etc

Open the file in Notepad and add the following entry.

127.0.0.1 localhost
127.0.0.1 test.localhost ( the name of your subdomain, this is an example for the subdomain test.localhost )

Now it is also good to restart your computer.

After you finish changing your DNS subdomain ready.

Good luck.
 
Back
Top