#1  
Old 30th July 2010, 00:59
Toucan Toucan is offline
Senior Member
 
Join Date: Dec 2009
Posts: 479
Thanks: 78
Thanked 39 Times in 33 Posts
Default Access site without DNS

I keep seeing posted time and time again people trying to access their site, without the domain having DNS entries.

The answer is as usual edit the etc/hosts file on the client machine.

...but I was wondering, phpmyadmin and webmail can both be accessed with http://my.ip./webmail and I notice that webmail seems to use a symlink to another directory. So you can probably see the question coming, could a symlink or similar be used to to serve a site linking from the apache root directory to the new domain without the need to enter dns settings?

To achieve something like this, http://my.ip/mynewsitewithnodns

That way people could access unregistered sites before domain names bought, dns entered etc etc.

Maybe my idea is crazy.. but if someone could answer before i get too curious, try it myself and break my set up!
Reply With Quote
Sponsored Links
  #2  
Old 30th July 2010, 20:02
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Should be possible, but remember that you have to enable PHP and all the other stuff for the main vhost then. I think it's a good idea to take a look at the phpMyAdmin Apache configuration to see how they did it.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 30th July 2010, 21:13
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,177
Thanks: 829
Thanked 5,414 Times in 4,257 Posts
Default

Quote:
So you can probably see the question coming, could a symlink or similar be used to to serve a site linking from the apache root directory to the new domain without the need to enter dns settings?
This depends very much on the website content. When the website contains only html files or a simple php based system that does not write to the local filesystem like phpmyadmin, then yes. If the site contains a cms like typo3, joomla or wordpress, then it will most likely fail or if you install it trough the symlink, it will not work correctly later when the site goes online. The reason is simple, with a symlink the php scripts run under the linux system user of the vhost that contains the symlink and not with the permissions of the target website. This is also a security problem as it allows your users to run php scripts with other permissions and so to circumvent the restrictions that jail their actions to their own website directory.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 31st July 2010, 02:19
Toucan Toucan is offline
Senior Member
 
Join Date: Dec 2009
Posts: 479
Thanks: 78
Thanked 39 Times in 33 Posts
 
Default

Thanks to you both. The simple concept does indeed have obvious flaws when though through.

Maybe the answer will be to write a short script that can run client side that could write to the hosts file.

Thanks guys.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS data from Standalone servers to Primary DNS server SamTzu Tips/Tricks/Mods 7 15th November 2009 13:38
Squid Proxy Caching on Linux obzerver Installation/Configuration 4 13th August 2008 19:51
Enable shell access on existing site gjm General 3 2nd June 2007 17:12
Unable send receive emails vassilis3 Installation/Configuration 15 19th May 2007 14:34
Access forbidden! dns configuration? suse10 x86_64 Praude Installation/Configuration 2 23rd February 2006 00:15


All times are GMT +2. The time now is 02:17.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.