More than one domain

Problems with the Windows version of XAMPP, questions, comments, and anything related.

More than one domain

Postby samdod » 04. February 2009 05:03

How do i set up more than one domain?

Thank you
samdod
 
Posts: 1
Joined: 04. February 2009 04:53

Re: More than one domain

Postby dmphotography » 04. February 2009 05:16

Search for vHosts or VirtualHosts.

I have a thorough tutorial on it here: http://www.myownserver.info/index.php/step-4-additonal-settings/23-multiplewebsites.html
For great video and written tutorials and guides on creating your own web server and installing things such as forums, blogs, etc., visit http://myownhomeserver.com
dmphotography
 
Posts: 191
Joined: 15. December 2008 14:25
Location: Columbus, MS
Operating System: Windows 7

Re: More than one domain

Postby Izzy » 04. February 2009 06:14

@samdod
This recent topic may help:
viewtopic.php?f=16&t=33165
which is just one of many examples that have been posted in this forum...

...and some more useful vhost info in here...
viewtopic.php?f=16&t=19525

...and a 'how to effectively search the forums' can be found here:
viewtopic.php?f=16&t=32670




Just a few observations re the Tutorial mentioned in the last post.

When defining the localhost vhost container in your tutorial there is no need to duplicate the localhost directory directive entry that is already defined in the default httpd.conf file, this could lead to errors and confusion.

<VirtualHost *:80>
ServerName localhost
DocumentRoot "B:/xampp/htdocs"
<Directory "B:/xampp/htdocs">
Options +Indexes FollowSymLinks +ExecCGI
AllowOverride AuthConfig FileInfo
Order allow,deny
Allow from all
</Directory>
</VirtualHost>


This is all that is required for localhost:

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


And why use the B: drive when the XAMPP default installation drive is the C: drive that you started the tutorial with and is just fine for the examples - again may cause confusion.


AllowOverride AuthConfig FileInfo
This is for the .htaccess file and the default should be:
AllowOverride All
http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride


So IMHO your tutorial will not reflect what a search in these forums will reveal, which over time, has been the accepted method of creating a vhost configuration file based on the Apache defaults, that may work for all.

The official docs are worth a read on this vhost subject and the correct default directive's syntax.
http://httpd.apache.org/docs/2.2/vhosts/
http://httpd.apache.org/docs/2.2/vhosts/name-based.html

http://httpd.apache.org/docs/2.2/mod/directives.html


I believe your tutorial needs some refinement for a default configuration and also worth a mention is that to create multiple entries first is not a good idea. Create one vhost then if that checks out and works then simply add another and then check again and so on.

Another tip when creating tutorials is to use the documentation for defaults and the correct syntax to use, as simply using the principle of what works for me will work for all, when in fact it may not work for others, where as the defaults will most likely work for all.

Good effort though - 7/10. :)

BTW Off topic but I find your web site is very slow to load, notorious fault with CMSs and Blogs - takes up to 30 times longer than the average complex Apache Friends page to load - try tweaking your resource and/or mysql settings perhaps or Google as you are not alone (there is a benchmark folder in the mysql folder that may help determine what may be amiss...

...and navigation is not clearly defined as to the contents of the menu items - try tool tips on mouse over (free JavaScripts) or some other preferred method.
Last edited by Izzy on 04. February 2009 11:44, edited 1 time in total.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: More than one domain

Postby dmphotography » 04. February 2009 11:33

Izzy wrote:Just a few observations re the Tutorial mentioned in the last post.

When defining the localhost vhost container in your tutorial there is no need to duplicate the localhost directory directive entry that is already defined in the default httpd.conf file, this could lead to errors and confusion.

<VirtualHost *:80>
ServerName localhost
DocumentRoot "B:/xampp/htdocs"
<Directory "B:/xampp/htdocs">
Options +Indexes FollowSymLinks +ExecCGI
AllowOverride AuthConfig FileInfo
Order allow,deny
Allow from all
</Directory>
</VirtualHost>


This is all that is required for localhost:

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



First off, thank you very much for the feedback and critique. I've been looking for someone to do that for me, but so far no one has been leaving any sort of replies other than thanks for the tutorials, which don't help me in refining the content and improving the site.

The extra directive for localhost was because I was getting a 403 error for some reason and I didn't know at the time how else to fix it, so I used those to override the issue. I indeed should go back and fix the syntax of that and troubleshoot the 403 issue if it even still exists.

Izzy wrote:And why use the B: drive when the XAMPP default installation drive is the C: drive that you started the tutorial with and is just fine for the examples - again may cause confusion.


I had initially installed XAMPP on a PC running Server 2003 and I put it on a separate hard drive from my system drive to help protect my system files. Whether that made any difference or not, I dunno, but it seemed logical to me and also was my way of keeping it separate so I could better learn XAMPP.

Izzy wrote:AllowOverride AuthConfig FileInfo
This is for the .htaccess file and the default should be:
AllowOverride All
http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride


I think that was a suggestion I found for fixing a permissions issue I was having and it worked. Haha.

Izzy wrote:So IMHO your tutorial will not reflect what a search in these forums will reveal, which over time, has been the accepted method of creating a vhost configuration file based on the Apache defaults, that may work for all.

The official docs are worth a read on this vhost subject and the correct default directive's syntax.
http://httpd.apache.org/docs/2.2/vhosts/
http://httpd.apache.org/docs/2.2/vhosts/name-based.html

http://httpd.apache.org/docs/2.2/mod/directives.html

I've definitely tried reading those and I have a hard time understanding them to be honest with you. Things written in that style are more confusing than helpful IMO, which is why I've done my best to make easy to understand and follow tutorials and explain things clearly and not use paraphrasing or abbreviations. The more I learn about XAMPP and Apache, the better I start understanding some of the things listed there, but they still are confusing as far as the correct syntax of using them.

Izzy wrote:I believe your tutorial needs some refinement for a default configuration and also worth a mention is that to create multiple entries first is not a good idea. Create one vhost then if that checks out and works then simply add another and then check again and so on.


The reason I had made three different vhost entries was to illustrate how they work. It allows me to show people how the site's document root folders can be named whatever they like and also how they can have it on separate drives other than the one XAMPP was installed on. I may need to explain the need to remove those if not used, but it was for illustration purposes, which helped me better understand it myself.

Izzy wrote:Good effort though - 7/10. :)


Thanks for that. If I hadn't had so many difficulties when I tried installing all of these things and learning them myself, I probably would've never attempted to make that website and the tutorials on it. But my way of thinking was if I can save a couple of people the troubles and headaches I encountered and all of the time I wasted learning all of it, then I've succeeded.

I've tried finding others to help with the site, such as critiquing the tutorials, giving me suggestions, and even authoring some articles themselves if they wish to make it a very resourceful and helpful place for those wanting to create their own servers. The problem is I never have received any response, which has left me doing it all myself. Just people doing what you've done with that one article would be a huge help, because you caught things I overlooked or didn't consider.

Izzy wrote:BTW Off topic but I find your web site is very slow to load - takes up to 30 times longer than the average complex Apache Friends page - try tweaking your resource and/or mysql settings perhaps (there is a benchmark folder in the mysql folder that may help determine what may be amiss...

...and navigation is not clearly defined as to the contents of the menu items - try tool tips on mouse over (free JavaScripts) or some other preferred method.


In regards to it's slowness, I think that's an issue with Joomla. My server should be plenty enough to run the website smoothly, P4 2.8GHZ, 2GB RAM. Joomla for some reason runs slow even on my current machine, which is easily a very nice gaming PC, so I don't know the best solution for fixing this. I turned caching back on, which without a doubt will help. I had it turned off because of the nuisance it causes when trying to update the site settings and having to clear the cache every time I look to see the difference in the format. I read the document on running that benchmark test and it's going to take me a few hours of researching it to understand how to use it.

As far as the navigation goes, I tried defining it clearly with the menu titles, but I can't say I'm the best at that. I think there's a tool tip option I can enable in the Joomla settings for that.

Thank you again very much for the feedback, as that definitely helps me on improving the site and most importantly, it will help people visiting it to get the help they're looking for.
For great video and written tutorials and guides on creating your own web server and installing things such as forums, blogs, etc., visit http://myownhomeserver.com
dmphotography
 
Posts: 191
Joined: 15. December 2008 14:25
Location: Columbus, MS
Operating System: Windows 7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 62 guests