LooseCannon wrote:Thanks Izzy. V nice feedback,,, as always.
Thanks and your welcome - for some I have to 'cross the Is and dot the Ts' or is that 'cross Ts and dot the Is'?
LooseCannon wrote:/me sups on a camomile tea...
That chamomile stuff is for external use to stop itchy spots and, but irrelevant for those in the UK
, sunburn! - try a real cupa (
or is it cuppa?) for internal use (
more caffeine that helps you stay up at night 'dotting the Ts and crossing the Is', oops!)
Anyhow back to the drawing board - you can change this:
- Code: Select all
<VirtualHost 127.0.0.1:80>
ServerName localhost
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
NameVirtualHost *:80
<VirtualHost *:80>
ServerName myDomain.local
ServerAlias www.myDomain.local
ServerAdmin serveradmin@myDomain.local
DocumentRoot "C:/xampp/myDomain/htdocs"
<Directory "C:/xampp/myDomain/htdocs" >
Options Indexes +FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ "C:/xampp/myDomain/htdocs/cgi-bin/"
</VirtualHost>
to this and try it again to see if it works:
- Code: Select all
NameVirtualHost *:80
<VirtualHost *:80>
ServerName localhost
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName myDomain.local
ServerAlias www.myDomain.local
ServerAdmin serveradmin@myDomain.local
DocumentRoot "C:/xampp/myDomain/htdocs"
<Directory "C:/xampp/myDomain/htdocs" >
Options Indexes +FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ "C:/xampp/myDomain/htdocs/cgi-bin/"
</VirtualHost>
These previous posts may be of help for you - the second is in German but the relevant part is not and in my browser, SeaMonkey, I can select from the Tools menu to Translate the page, which is performed by Google - not perfect but understandable-ish.
http://community.apachefriends.org/f/viewtopic.php?t=22826http://community.apachefriends.org/f/viewtopi ... host#34538Also a search on these English forums for vhost or virtualhost will give you many results, as it is a very popular subject indeed.
I take it that this was a typo?
6. IE - http:\\myDomain.local - bingo:
Return your host file to include the
127.0.0.1 mydomain.local entry and also add any more entries for domains you want to access locally.
Try and access XAMPP by using a URL before using the Admin... button in the control panel.
http://localhost/
or
http://127.0.0.1/
Now in answer to your questions:
a.
http://httpd.apache.org/docs/2.2/vhosts/name-based.html
http://httpd.apache.org/docs/2.2/mod/co ... irtualhost
http://httpd.apache.org/docs/2.3/vhosts/examples.html
All the directives are here:
http://httpd.apache.org/docs/2.2/mod/directives.html
b.
I asked you to check this was correct because usually it is, as you say
DocumentRoot "C:/xampp/htdocs"
but I had no way of knowing so I included in the localhost container the only one I knew you had.
(
Sorry I should have dotted the T, oops!).
c.
I was assuming that
http://myDomain.local was a fully qualified domain name (
FQDN) registered with a domain name registrar (
GoDaddy etc.) and with
nameservers from the likes of
ZoneEdit etc. for your dynamic IP (
after you tell the nameservers each time it changes) to know where to find your site and therefore accessible from the Internet - you did say you had a external dynamic IP which is totally irrelevant at the internal local level.
http://community.apachefriends.org/f/viewtopi ... 792#109792
If not and this is your only site, other than XAMPP, accessible locally, then there is no need of a vhost container and you should revert the vhost conf file to the default.
You then delete the index.php in the htdocs directory and place your site's index file and the rest of the site's files and directories in there so that
http://localhost/
will now show you your site and
http://localhost/xampp
will show the XAMPP Welcome Page.
If it had been a
FQDN then the vhost configuration above would have worked instead of going to the local.co.uk link directory site.
What happened is this - if you are connected to the Internet via your ISP and you type an address
http://myDomain.local in your address bar then the browser sends that off to your ISP's Domain Name Servers to find the address where to send it.
If it can't find that address in it's DNS database then it sends it either to a domain that is registered to receive mis-spelled or similar domain names, like it did to local.co.uk, or it returns an unknown address error to your browser, like it did with your BannanaArmy
address - I am sure you will have seen a few of these and also ended up at sites like local.uk.co after typing in a different URL in your browser.
If someone else, not on your local network uses your
http://myDomain.local and you have it registered like I mentioned above and you have your server running then they will see your site, as Apache, via the vhost conf file, knows where to look for it and can distinguish it from the localhost (
XAMPP) site and so will serve your site to the visitor.
Sorry for the book length post again but I have this irresistibly urge to 'cross the Is and dot the ts' - oops! again, damn it.
Some members here might post a suggestion that using an XAMPP loader/launcher might make all this, life and everything much easier but IMHO. knowing the intricacies of a web server and it's configuration files is really what this webmaster game is all about, don't you think?
Anyhow, I HTH.
===========================================
1. The new
DeskTopXampp launch control for
XAMPP / XAMPPlite
Posted by
Ridgewood available from Ridgewood's
DTX web site
2.
Make Richer Ajax Applications - Faster
TIBCO General Interface Pro Edition but
FREE and
Open Source
Fully working with
NO donations required to get a user/password
===========================================