Page 1 of 1

Wan Access Vhosts on xampp with dns not working.

PostPosted: 17. May 2015 00:32
by badincite
I can access the vhosts for my owncloud installation from the lan on another pc but I am unable to access it from the wan. Is there somewhere I have to add the dns access permissions? I can access via IP also and I have added 127.0.0.1 mydomain.com to my hosts file on the machine.


httpd-vhosts.cong

NameVirtualHost *80
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs"
ServerName localhost
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "C:/xampp/apps/owncloud/htdocs"
ServerName mydomain.com
ServerAlias www.mydomain.com
<Directory "C:/xampp/apps/owncloud/htdocs">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

httpd.conf

<Directory "C:/xampp/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

<Directory "C:/xampp/apps/owncloud/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

owncloud config.php

<?php
$CONFIG = array (
'instanceid' => 'ocqithb51m6x',
'passwordsalt' => '7.FmUmvOrIbkmviCfgy7aW0IRz2YvN',
'secret' => 'RKWCukRviiF3XTYsnpMZx3vQeNxBlCWnshfoBPIidsUG7rQL',
'trusted_domains' =>
array (
0 => '192.168.2.52',
1 => 'mydomain.com',
2 => 'externaliphere',
),
'datadirectory' => 'C:\\xampp\\apps\\owncloud\\data',
'overwrite.cli.url' => 'http://localhost/owncloud',
'dbtype' => 'mysql',
'version' => '8.0.3.4',
'dbname' => 'bitnami_owncloud',
'dbhost' => 'localhost:3306',
'dbtableprefix' => 'oc_',
'dbuser' => 'bn_owncloud',
'dbpassword' => 'e41da1fb97',
'installed' => true,

'mail_smtpmode' => 'smtp',
'mail_smtphost' => 'ssl://smtp.gmail.com:465',
'mail_smtpauth' => true,
'mail_smtpname' => 'blah@gmail.com',
'mail_smtppassword' => 'pass',

);

Re: Wan Access Vhosts on xampp with dns not working.

PostPosted: 17. May 2015 11:37
by Nobbie
If your are running a router and Xampp is a normal PC inside the LAN, you cannot access that PC directly from WAN, because the LAN IPs are not public IPs (due to TCPIP Definitions). Instead you have to access the WAN IP of your Router (which usually is assigned dynamically by your provider) and inside the Router Setup, you have to define a Porforwarding of Port 80 to the Xampp PC.

Re: Wan Access Vhosts on xampp with dns not working.

PostPosted: 17. May 2015 14:44
by badincite
I'm retarded i've been typing in my dns name wrong....