Need help setting XAMPP web server up!

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

Need help setting XAMPP web server up!

Postby patrick_004 » 09. June 2010 00:00

Ok guys this is what I got going on.

I am running the latest XAMPP with 1.5 joomla all on a windows xp box.

I am extremely new to the world of XAMPP and Joomla so bare with me.

What I am trying to do is turn this box into a dedicated web server for this one website. I already have a live ip address to work with and I have a domain name.

I have already got the full website set up with the database, but I need to publish it to the web for everyone to see.

This is where my lack of knowledge comes into play.

When I change my “A” records for my url to point to my live ip, It sends it to my XAMPP admin consol. “VERY BAD”!

(Ex. When I type in my url www.mywebsite.com, it sends it directly to my XAMPP consol.)

This is what I am looking for.
Tutorial for setting up my XAMPP joomla website to be viewed on the WWW.
And how to secure my XAMPP.

If you need any additional information pleas ask.
patrick_004
 
Posts: 11
Joined: 08. June 2010 20:59

Re: Need help setting XAMPP web server up!

Postby Altrea » 09. June 2010 00:11

patrick_004 wrote:When I change my “A” records for my url to point to my live ip, It sends it to my XAMPP admin consol. “VERY BAD”!

(Ex. When I type in my url http://www.mywebsite.com, it sends it directly to my XAMPP consol.)


If you leave all xampp default-files in your DocumentRoot Folder (e.g. htdocs) then there is a index.php directly in this folder. And this index.php files redirects all requests to the XAMPP admin consol.
Simple solution: Delete/Rename/Change the index.php file and create a htaccess auth for your xampp-folder.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Need help setting XAMPP web server up!

Postby patrick_004 » 09. June 2010 04:20

when i took a look at the index.php this is what it had.

Code: Select all
<?php
   if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
      $uri = 'https://';
   } else {
      $uri = 'http://';
   }
   $uri .= $_SERVER['HTTP_HOST'];
   header('Location: '.$uri.'/xampp/');
   exit;
?>
Something is wrong with the XAMPP installation :-(


Do i need to reinstall?

If so, how do i do it without loosing all the progress that i have already made?
patrick_004
 
Posts: 11
Joined: 08. June 2010 20:59

Re: Need help setting XAMPP web server up!

Postby Altrea » 09. June 2010 05:17

patrick_004 wrote:Do i need to reinstall?

No. You need to llearn a lot more about PHP, XAMPP and all the stuff you use!

This file is exactly what i told you before. This is the Default index.php file which comes with XAMPP and does nothing more then to redirect you to the xampp administration panel.

Altrea wrote:Simple solution: Delete/Rename/Change the index.php file and create a htaccess auth for your xampp-folder
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Need help setting XAMPP web server up!

Postby patrick_004 » 09. June 2010 15:21

Yes, i know that i need to:
Code: Select all
Delete/Rename/Change the index.php file and create a htaccess auth for your xampp-folder


But that dose not tell me how to do it.
I am very new to this and i need a little more direction.
patrick_004
 
Posts: 11
Joined: 08. June 2010 20:59

Re: Need help setting XAMPP web server up!

Postby Radzio » 09. June 2010 15:43

If you are completely new to Apache webserver, browse its documentation or just use xampp security pages to make 'everything' secure.
Radzio
 
Posts: 81
Joined: 05. June 2010 12:26

Re: Need help setting XAMPP web server up!

Postby patrick_004 » 09. June 2010 16:17

Ok, i have been on the Apache website and i found a bunch of information for Authentication and security. But the one thing that's got me stump is the index.php and how to rewrite it so my url points to my website folder and not my admin panel.

When i google for directions on editing the index.php, i get a bunch of tuts that are for dynamic ip address, but what im looking for is information for live ip.

I would just like to take a minute to say that i want to learn this. I'm not just asking questions to perform one certain task and be done with it. I am very intrigued by this, and i try to figure out everything on my own until i hit a wall :x :x .

All im asking is for a little more direction, give me some stuff i can google for and the rest i can somewhat figure out on my own.
patrick_004
 
Posts: 11
Joined: 08. June 2010 20:59

Re: Need help setting XAMPP web server up!

Postby Altrea » 09. June 2010 16:27

How did you upload all your xampp files?
FTP-Client?
Direct Server File Access?

Thats the way how you get rid of this file too.
btw: i don't know if it makes sense to you to have uploaded the xampp stuff to your dedicated server.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Need help setting XAMPP web server up!

Postby patrick_004 » 09. June 2010 16:47

I use remote desktop connection, but most of the time im sitting right in front of the server.

When you say:
Code: Select all
Delete/Rename/Change the index.php file


Do you mean just deleting it completely? Or deleting the contents inside the file and rewriting it?
patrick_004
 
Posts: 11
Joined: 08. June 2010 20:59

Re: Need help setting XAMPP web server up!

Postby Altrea » 09. June 2010 17:01

Thats up to you.
If your DocumentRoot Folder should stay the same as now (...\htdocs), it makes sense to have a index.php file in this folder.
So you can just delete the sourcecode in this file and create your own.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Need help setting XAMPP web server up!

Postby patrick_004 » 09. June 2010 17:28

Ok, this is how all this information is digesting in my brain.

1. Copy the default index.php file from "C:\xampp\htdocs" to "C:\xampp\htdocs\my.website.root.folder"
2. Delete the index.php file from "C:\xampp\htdocs"
3. rewrite the index.php file i copied to "C:\xampp\htdocs\my.website.root.folder" like so :

Code: Select all
<?php
   if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
      $uri = 'https://www.mywebsiturl.com';
   
   }
   $uri .= $_SERVER['HTTP_HOST'];
   header('Location: '.$uri.'\xampp\htdocs\my.website.root.folder');
   exit;
patrick_004
 
Posts: 11
Joined: 08. June 2010 20:59

Re: Need help setting XAMPP web server up!

Postby Radzio » 09. June 2010 17:33

You don't need this file.
Radzio
 
Posts: 81
Joined: 05. June 2010 12:26

Re: Need help setting XAMPP web server up!

Postby patrick_004 » 09. June 2010 17:55

Your telling me i dont need this file, but when i remove it and try to go to the website by the url, it takes me to a index page where it shows my website folder and xampp folder.

I cant seem to understand how to get my url to point to my website folder and not the full htdocs folder.
patrick_004
 
Posts: 11
Joined: 08. June 2010 20:59

Re: Need help setting XAMPP web server up!

Postby Radzio » 09. June 2010 18:27

You need to modify DocumentRoot directive of your Apache's config. (httpd.conf)
Radzio
 
Posts: 81
Joined: 05. June 2010 12:26

Re: Need help setting XAMPP web server up!

Postby patrick_004 » 09. June 2010 19:43

Dose the file look something like this

Code: Select all
#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned. 
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "C:/xampp/apache" will be interpreted by the
# server as "C:/xampp/apache/logs/foo.log".
#
# NOTE: Where filenames are specified, you must use forward slashes
# instead of backslashes (e.g., "c:/apache" instead of "c:\apache").
# If a drive letter is omitted, the drive on which httpd.exe is located
# will be used by default.  It is recommended that you always supply
# an explicit drive letter in absolute paths to avoid confusion.

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
patrick_004
 
Posts: 11
Joined: 08. June 2010 20:59

Next

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 143 guests