step by step..
(apply brakes here)I was about to create a new spoof virtual domain for my LAN, and it occurred to me.. "I should write down the steps I take, save someone else doing it, save time".
So, here goes..
1: Create the fake host..Every machine you wish to fool, needs to have host entry for your spoofy domain. Let's call this spoof domain "arc". The host file entry would simply be..
See here for details of how to add hosts to your particular machine.
I have one central hosts file that I import into all the different machines. I find this easier to maintain. A local DNS server is another option (or, as suggested by Druid; add the entry to your local nameserver's hosts file, if you have one).
Typing arc into any local browser will now point the it to the Apache server, which will completely ignore the request, until we..
2: Create a virtual host in apache config..I keep mine in a vhosts.conf file, right next to the httpd.conf (I use an include statement to pull the directives in). The "arc" entry goes something like this..
<VirtualHost *> ServerName arc ServerAlias arc.com arc.org ServerAdmin email@example.com DocumentRoot "W:/tech/dev" DirectoryIndex index.html index.php ServerSignature Email </VirtualHost>Note the aliases, (handy for testing rewrite rules and such). You can add as many aliases as you like, so long as you also create corresponding host entries for each (step 1). Also note, this entry is for a Windows® Apache server; I figured it was about time to do a Windows-orientated article. Really, only the
DocumentRootdirective is different.
3: Restart apache..Sadly I don't have the "corzweescriptpack" for windows, although I do have a righteous /unix subtree on my windows box! Aye, I mean emacs, tcsh, ls, tar, the works! That's right! I do
lsto get directory listings on my peecee! Oh Joy of UNIX!
However, Apache for windows comes with a whole host of useful shortcuts, so restarting's a breeze; apache also installs as a system service, handy. On UNIX/Linux, your usual apachectl command will be fine. On Mac OS X, use corzweescriptpack! .. ra
We're done!This is what we get typing arc into a web browser now..
Welcome to the comments facility!
most impressed with your work on hacking the voyager 205. My issue is i want to view web space in my wwwroot folder (iis) from the Internet (through router) other than just being able to view this on an intranet basis (192.168.1.3/"foldername"/index.htm).
I have tried to follow your examples many times to no avail and feel I am getting confused to all the settings needed.
I am also aware you may recieve many requests on the things already covered in your tutorials but I can only ask. please help
Deikliw, it really depends what type of access you require. I know enough about IIs to avoid it, but I'll assume you mean regular filesystem access, these principles apply to any web server setup..
FTP. Why not setup an ftp server, put your www root folder into one of the accounts and login with a regular FTP client. Simple, robust, and if you use SFTP or similar, highly secure, too.
WebDAV. I'm fairly sure IIs can do webdav, Apache certainly can. WebDAV gives you a sort of filesystem access via the web server itself. Enabling webdav in your root has potential security issues, but I'll leave these for you to explore. All network access has potential security issues, of course.
Some other server. There are literally hundreds of different servers that will give you access to a filesystem over the internet. They don't have to be in any way connected to the webserver which just happens to also use the folder you want to access. Why not setup an SSH server?
Food for thought.
Whichever server you decide upon, it will probably need a port-forwarding rule setup on your router (though not WebDAV). If you have trouble with that, post a comment on the voyager page (after checking out the recipes, of course!)
plz send the all step of the DNS that how do create Domaim and etc.
Isn't that THIS page?
ok pop quiz hot shot
do u know how to do wild-cards in the hosts file (linux) for catching all sub-domains? so far I have had no luck finding the solution...
e.g. my host file is growing out of control:
127.0.0.1 sub1.domain.com sub2.domain.com sub3.domain.com (continued for a long time)
what i want to do is this:
thing is - it don't work :(
now, yes - "why dont u just use one domain and folders within?" - well i need this for testing purposes. I have built a web app which gives users a subdomain when they sign-up... everytime i wanna test if the new sub domain works - yup, i have to edit my host file - which is a royal pain in the bottom
so - i could build a script to update it automagically - but surely there is a better way?
u have a really good informative site here so i hope u can shed some light - perhaps there is a nifty nix app which solves my problem?
may the force b with u - and keep up the good work
p.s. forgive me if u already have the solution on your site... if so, i suck lol
I'm always up for a pop quiz, bungle, let's do it..
do u know how to do wild-cards in the hosts file…?
there is a better way?
At least now you can see what's going on. Much easier to run regex over it, too; make global changes, and so on.
As for manipulating this list in meaningful ways; on Linux, sed is your friend.
ps. you might also want to consider running BIND.
nice one mate - one per line is better, i'll scope out BIND too - thanks for the quick response
I'm trying to have more than one virtual domain, but I can't get it working!
Contents of hosts:
Contents in end of httpd.conf:
With this configurations, both www.devdynaplan.com and www.devmyrtveitfoto.no leads to the www.devdynaplan.com-site. If I change the order of them in httpd.conf, both of the urls leads to the www.devmyrtveitfoto.no-site. What am I doing wrong?
Thank you so much for your help and insight!
I found the solution through some googling, and posting it here in case anyone else needs it
Add this line to httpd.conf:
It's Ubuntu. Regardless, yes, you do need that somewhere. Thanks!
thanks, this really helped in combination with the host file on my linux server, now my game server should report locally and not to gamespy.