Page 1 of 1

Changing main directory

PostPosted: 31. August 2007 03:17
by SKi
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

PostPosted: 31. August 2007 14:50
by skuipers
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>

PostPosted: 31. August 2007 17:20
by SKi
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

PostPosted: 31. August 2007 18:28
by ManUnix
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