web site home page in root directory

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

web site home page in root directory

Postby nanogeek » 05. May 2010 13:41

I have been using XAMPP happily to serve my local intranet , built using Joomla 1.5, from my local computer for some time. I have several sites, each residing dutifully in its own directory under .../htdocs/
I have now been tasked with placing one of the sites on a remote server. We want to let employees access the site with a short URL i.e. "localnews"
I have been told by out IT guy that the local DNS server can only forward to the root directory of a machine, so if the server is on 168.192.123.45 the DNS would forward "localnews" to the root of 168.192.123.45 and the index.php page needs to be in the root directory of that machine.


How can I set up XAMPP to look at the root for the home page?
Will I need to reconfigure PHP? Joomla?
Will the programs still reside in C:\Program Files\xampp\ ?
I can follow directions and examples very well, but I am not a professional web builder or computer programmer.
Can you help?

TIA
nanogeek
nanogeek
 
Posts: 4
Joined: 05. May 2010 13:29

Re: web site home page in root directory

Postby JonB » 05. May 2010 15:18

Hi -

IF the server is a web hosting provider's server, in most cases the Apache server, PHP and MySQL will probably already be installed. Joomla 'may' also be already installed. Its likely all you will need to do is install (if needed) Joomla, and then move and/or migrate your Joomla site. Usually you only have access to 'your area' on a server, so XAMPP is probably a thing of the past. Most webhosts provide phpMyAdmin as part of the package. Depending on how the Apache Server is configured, it 'might' be htdocs, public_html, www or some other folder name. The webhosting comapny will provide that info.

You'll need to watch the Joomla and PHP versions supplied if they are already installed.

You didn't say what version of Joomla you are on, but that will be something you should check out on Joomla's site.

http://docs.joomla.org/

http://forum.joomla.org/viewtopic.php?f=126&t=270866

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: web site home page in root directory

Postby nanogeek » 05. May 2010 16:10

Thanks for your reply. Perhaps I wasn't clear enough in my initial post.
The web site is an internal web site for our organization only. (an intranet)
It is being moved to a newly created virtual file server running Windows Server 2003 on one of the organization's computers.
This particular virtual server has nothing installed on it. I will install XAMPP.
I am running Joomla 1.5. I am installing an older version of XAMPP to avoid compatibility problems.
My question stands.

Thanks again
nanogeek
 
Posts: 4
Joined: 05. May 2010 13:29

Re: web site home page in root directory

Postby JonB » 06. May 2010 16:44

virtual file server running Windows Server 2003


Virtualized how?

This is one your IT folks should understand. In a virtualized environment, the container IS your server. SO there will be a 'virtual' "C:" drive. The root of any webserver is the folder pointed to the directory/folder directives in the setup of the webserver (whether Apache, IIS or whatever.

Short answer; it will be like installing on your local drive. c:\xampp\htdocs will still be your root of "XAMPP Apache" when installed.

Long answer: This is a puzzling arrangement to me, so there is some chance it may not work. I hope they are pretty up on provisioning Virtual Machines. BUT the IP redirection done by the software used to virtualize the environment will not be seen by DNS. So the 'localfriendlyname' will only need to point to the actual listening IP in the physical machine (node) that hosts the virtual environment. There is a huge and long list of possible gotcha's here, including the fact that XAMPP is registry agnostic.

If they mean "You will be running in a virtual server of an IIS installation on a Windows 2003 Server"; this is NOT what you described. XAMPP is an inappropriate solution in that situation.

Good Luck
:roll:
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: web site home page in root directory

Postby nanogeek » 09. May 2010 11:10

JonB wrote:
virtual file server running Windows Server 2003

.
.
.
Short answer; it will be like installing on your local drive. c:\xampp\htdocs will still be your root of "XAMPP Apache" when installed.
.

If they mean "You will be running in a virtual server of an IIS installation on a Windows 2003 Server"; this is NOT what you described. XAMPP is an inappropriate solution in that situation.

Good Luck
:roll:



Thanks for your reply

My understanding is that there is a single physical machine which has the ability to act as many virtual servers. IIS is not running on ''my'' virtual server ( I turned it off) Apache XAMPP is running.
When I configure the document root in httpd.conf to c:/mydirectory and I put the home page of the web site in c:/mydirectory I can tell the network's local DNS server that MyWebSite should redirect to the IP of MyVirtualServer and it serves the page.
BUT then I can't access the XAMPP for windows home page, phpMyAdmin or Webalizerweb.


So I ask, how can I serve the homepage of my local intranet from the document root and still have access to all the other goodies in the ''XAMPP for Windows'' web page on my localhost
I am a n00B and not a professional web guru or IT person.
Please be patient and use small words
nanogeek
 
Posts: 4
Joined: 05. May 2010 13:29

Re: web site home page in root directory

Postby deck2deck » 07. June 2011 19:20

Did you ever get a resolution to this problem?

I have EXACTLY the same configuration and am attempting to do what you're doing, but I have encountered a different issue.

When I am logged into the virtual server and open a browser, I can get to the Intranet site ('localnews') and it behaves as expected. However, no one else can see the site from any other computer inside our network... they get a 'page cannot be displayed' error message.

I've been around and around trying to solve this myself as well as canvassing forums, but no one has offered to help. Can you tell me if you fixed your issue and if so, how you did it? Or do you think you can solve mine?

Thanks!
deck2deck
 
Posts: 12
Joined: 07. June 2011 16:09
Operating System: Windows Server 2008 R2, 6.1

Re: web site home page in root directory

Postby nanogeek » 09. June 2011 12:54

My issue remains unresolved. I workaround the problem by having an empty page in //servername/index.html with a redirect to //servername/localnews/index.php . I use //servername/xampp when I want to use the XAMPP


Are you sure others are using the correct address? //servername/siteDirectory
If your homepage is not index.htm index.html or index.php you may also have a problem.
Good luck
nanogeek
 
Posts: 4
Joined: 05. May 2010 13:29

Re: web site home page in root directory

Postby Nobbie » 09. June 2011 14:30

I have read this thread for the first time and i think, all you need is called a "VirtualHost".

You have one server running Xampp (Apache), you have another Windows Server, which provides the filesystem for //servername/localnews (from the view of the Xampp Server) and you want configure Apache to show the contents of //servername/localnews if any lan client browser requests http://localnews? Am i right? And what is the standard servername for the Xampp Server? Or do you simply enter the local IP of the Xampp Server in your client browsers in for http requests?
Nobbie
 
Posts: 13182
Joined: 09. March 2008 13:04

Re: web site home page in root directory

Postby deck2deck » 09. June 2011 17:05

Hi Nanogeek and thanks for trying to help.

I solved my situation but don't know if I can help you solve yours; I will try. I solved mine by 1) turning off the Firewall and 2) editing the configuration file. The former is easy to do; here's how I did the latter:

Use Notepad, open file (located at xampp/apache/conf/extra/httpd-xampp.conf). Scroll all the way down to the bottom until you see this:

# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from 127.0.0.0/8
ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>

Edit out the 'Deny from all' by putting a hash mark (pound sign) in front of it so that the code now looks like this:

# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
#Deny from all
Allow from 127.0.0.0/8
ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>

I think you basically had the same issue as me, but as long as your DNS is set correctly, it should work right out of the box. Since mine didn't, I started from scratch by uninstalling everything (including XAMPP) so that I was back to a virgin server with nothing on it but the operating system. Then I enabled IIS to test different machines to make sure all of them could reach the home page (they could -- they got the default start page of IIS). THEN I stopped the IIS service first, disabled the Firewall, then re-installed XAMPP and edited the configuration file as described above. Voila -- all worked as planned.

I realize this is a year after your problem and you may not want to go to all that trouble, but it sounds like a DNS issue in your case because the product *should* work right out of the box with simple installation.

I hope this helps. If not and you wish to discuss more, please post back. Thanks!! :)
deck2deck
 
Posts: 12
Joined: 07. June 2011 16:09
Operating System: Windows Server 2008 R2, 6.1

Re: web site home page in root directory

Postby hackattack142 » 15. September 2011 01:31

While that may work around your problem, you might want to look into more restrictive options. Blindly opening up all your administration/security/status pages to the world may not be the best option.

You can split that into multiple entries like so:
Code: Select all
<LocationMatch "^/(?i:(?:xampp))">
Order deny,allow
Deny from all
Allow from 127.0.0.0/8
ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>

<LocationMatch "^/(?i:(?:security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from 127.0.0.0/8
ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>


So you can keep your administration stuff more secure. You could also add additional "Allow from" entries to restrict it to certain IPs/ranges/subnets.
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 701
Joined: 20. May 2011 23:29
Operating System: Windows 7 Ultimate SP1 64-Bit


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 53 guests