Changing main directory

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

Changing main directory

Postby SKi » 31. August 2007 03:17

I've run xampp on windows XP and had no issues. Now that I'm running Lampp on openSuSE 10.2. I don't really have a lot of problems so far, mostly was looking for information on how to get my directory to point to some where else.

When I go to localhost or my DNS it directs me to http://www.(mynamehere).net/xampp/
Where I would rather it have it let me go to http://www.(mynamehere).net
Not only that but I've crated a file in root called SID to store my files in.

example:
/SID/index.php

So the question is how do I set this up in my .conf files and what files do I need to change to get the viewers to this location?

Note that I do not plan on running more then one web page and that I will use sub domains for any others I wish to host.

Thank you for your time, SKi :D
SKi
 
Posts: 2
Joined: 31. August 2007 03:04

Postby skuipers » 31. August 2007 14:50

The most simple thing to do it to put the following index.html file in your /opt/lampp/htdocs:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
<title>your_site_name</title>
<script type="text/javascript">
document.location.replace('SID/index.php');
</script>
</head>
<body>
</body>
</html>
skuipers
 
Posts: 102
Joined: 21. January 2005 16:27
Location: The Netherlands

Postby SKi » 31. August 2007 17:20

skuipers wrote:The most simple thing to do it to put the following index.html file in your /opt/lampp/htdocs:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
<title>your_site_name</title>
<script type="text/javascript">
document.location.replace('SID/index.php');
</script>
</head>
<body>
</body>
</html>


Well it worked.. kind of.

I get this now when I type in localhost

http://localhost/sid/index.php

I wish to be rid of the /sid/ part completely if at all possible. So it may look like this.

http://localhost/index.php


Also I get a 404:
Not Found

The requested URL /sid/index.php was not found on this server.
Apache/2.2.4 (Unix) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8e PHP/5.2.3 mod_apreq2-20051231/2.5.7 mod_perl/2.0.2 Perl/v5.8.7 Server at localhost Port 80


Thanks, SKi :D
Never argue with a fool. People might not know the difference.
SKi
 
Posts: 2
Joined: 31. August 2007 03:04

Postby ManUnix » 31. August 2007 18:28

Hi SKi,

SKi wrote:I wish to be rid of the /sid/ part completely if at all possible.

so, why aren't you putting everything directly into the "htdocs" folder?

If you want to keep your directory ("htdocs/sid") you have to change the DocumentRoot in your httpd.conf

cu,
Manu
User avatar
ManUnix
 
Posts: 113
Joined: 16. April 2006 15:14


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 24 guests