Access subdomains online [SOLVED]
Posted by: jp (---.bredband.comhem.se)
Date: April 22, 2013 09:46PM

Hey guys!

Have been using wamp for a long time now and I love it!

Recent I got the idea to setup my own cloud based storage service using owncloud.org great software.

So I wanted to setup a subdomain like "cloud.jpbernhardt.com" which shall be accessed online (internet).

I've gone through a couple of threads here in the forum about setting up subdomains but in the end I can't get it to work. I can't access it online.
All I get from the browser is something like this:
Connection disconnected
Connection to cloud,jpbernhardt.com was interrupted etc.

To point out my primary site jpbernhardt.com works like a charm.


-----
In the www folder I have the following:
*cloud (folder)
*jpbernhardt (folder)
*logs (folder)
*index.php
*testmysql.php

I've enabled vhost in the "httpd.conf" file and edited the "httpd-vhosts.conf" file like this:

NameVirtualHost *:80

<VirtualHost *:80>
ServerName localhost
DocumentRoot R:/wamp/www
ErrorLog "R:/wamp/www/logs/error.log"
CustomLog "R:/wamp/www/logs/access.log" common
</VirtualHost>

<VirtualHost *:80>
ServerName jpbernhardt.com
ServerAlias *.jpbernhardt.com jpbernhardt
DocumentRoot R:/wamp/www/jpbernhardt
ErrorLog "R:/wamp/www/jpbernhardt/logs/error.log"
CustomLog "R:/wamp/www/jpbernhardt/logs/access.log" common
<directory "R:/wamp/www/jpbernhardt">
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Allow from all
</directory>
</VirtualHost>

<VirtualHost *:80>
ServerName cloud.jpbernhardt.com
ServerAlias cloud
DocumentRoot R:/wamp/www/cloud
ErrorLog "R:/wamp/www/cloud/logs/error.log"
CustomLog "R:/wamp/www/cloud/logs/access.log" common
<directory "R:/wamp/www/cloud">
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Allow from all
</directory>
</VirtualHost>



Inside the cloud folder (which will contain the nessessary files for the cloud service) there is a logs folder and a index.html file. The index file is just there for testing purposes.



Edited 1 time(s). Last edit at 04/24/2013 09:34PM by jp.

Options: ReplyQuote
Re: Access subdomains online
Posted by: RiggsFolly (---.as13285.net)
Date: April 22, 2013 10:01PM

Try this assuming 2 subdomains called john.example.com and jane.example.com


<VirtualHost *:80>
ServerName www.example.com
ServerAlias example.com
DocumentRoot C:\wamp\www\
</VirtualHost>

<VirtualHost *:80>
ServerName www.john.example.com
ServerAlias john.example.com
DocumentRoot /var/www/john
</VirtualHost>

<VirtualHost *:80>
ServerName www.jane.example.com
ServerAlias jane.example.com
DocumentRoot /var/www/jane
</VirtualHost>

<VirtualHost *:80>
ServerName www.jpbernhardt.com
ServerAlias jpbernhardt.com
DocumentRoot R:/wamp/www/jpbernhardt
ErrorLog "R:/wamp/www/jpbernhardt/logs/error.log"
CustomLog "R:/wamp/www/jpbernhardt/logs/access.log" common
<directory "R:/wamp/www/jpbernhardt">
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Allow from all
</directory>
</VirtualHost>

<VirtualHost *:80>
ServerName www.cloud.jpbernhardt.com
ServerAlias cloud.jpbernhardt.com
DocumentRoot R:/wamp/www/cloud
ErrorLog "R:/wamp/www/cloud/logs/error.log"
CustomLog "R:/wamp/www/cloud/logs/access.log" common
<directory "R:/wamp/www/cloud">
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Allow from all
</directory>
</VirtualHost>

Options: ReplyQuote
Re: Access subdomains online
Posted by: jp (---.bredband.comhem.se)
Date: April 22, 2013 10:09PM

nope that didn't work:

The connection has timed out


The server at cloud.jpbernhardt.com is taking too long to respond.


The site could be temporarily unavailable or too busy. Try again in a few
moments.
If you are unable to load any pages, check your computer's network
connection.
If your computer or network is protected by a firewall or proxy, make sure
that Firefox is permitted to access the Web.

Options: ReplyQuote
Re: Access subdomains online
Posted by: RiggsFolly (---.as13285.net)
Date: April 23, 2013 11:41PM

Have you checked the apache error log and or php error log for any messages that may give you a clue?

Options: ReplyQuote
Re: Access subdomains online
Posted by: jp (---.bredband.comhem.se)
Date: April 24, 2013 08:09PM

Nahhh - found the problem - stupid of me. Forgot to register the subdomain at my hosting place.



Edited 2 time(s). Last edit at 04/24/2013 09:35PM by jp.

Options: ReplyQuote


Sorry, only registered users may post in this forum.