XAMPP path settings |
[eluser]Unknown[/eluser]
I have XAMPP running on a separate drive F: I have defined my windows xp host file to read 127.0.0.1 CIDemo.com localhost. When I browse to http://cidemo.com the system launches the xamp index.php file because that is what is defined to happen in /htdocs/index.php. However, if I change the index.php file to read header('Location: '.$uri.'/CodeIgniter/'); I get a file not found error, unless I put CodeIgniter under /xampp/htdocs/. My httpd.conf file shows ServerRoot "F:/xampp/apache". It shows DocumentRoot "F:/xampp/htdocs". Does that mean the folder located at F:\CodeIgniter\index.php is really seen by the apache server as F:/xampp/apache/xampp/htdocs/CodeIgniter/index.php? If so, how does the system parse http://cidemo.com/Codeigniter/index.php? What changes would I need to make to get the line above to launch? If I make changes in httpd.conf file for DocumentRoot, will that cause the other utilities such as PHPMyAdmin grief? Thanks.
[eluser]Dam1an[/eluser]
I've tried changing the web root via httpd.conf in XAMPP in the past and it broke a lot from what I remember In the end, I went with the default install and used sym links to acheive the structure I wanted... much easier
[eluser]Daniel Moore[/eluser]
Set yourself an alias. Keep the actual document root as the original (I've changed mine, but for an apache novice, I recommend leaving it alone.) Open up your httpd.conf file and add an alias to handle what you need. Code: # Alias for CodeIgniter, will be at http://cidemo.com/Codeigniter/ You can just place that at the end of your current conf file. That should do it for you. When you use an Alias, it will "remap" a path on your hard drive to a server path/url. Let me know if that works for you.
[eluser]Unknown[/eluser]
Thank you for your help. I can't exactly tell what difference the alias is making. I put it at the end of the httpd.conf file and reloaded apache. When I browse to http://cidemo.com the system launches the index.php file designated by <Directory "F:/xampp/htdocs"> which then launches the xampp starter pages. If I force it to load http://cidemo.com/CodeIgniter/index.php then the proper page loads. I have the $config['base_url'] = "http://cidemo.com/"; and $config['index_page'] = "index.php"; $config['uri_protocol'] = "AUTO"; Is there some other default I need to set?
[eluser]Daniel Moore[/eluser]
Ah, sorry. I understood you were trying to set up CodeIgniter at http://cidemo.com/CodeIngiter. You are actually wanting to change the document root itself. If you do this, you won't be able to access the xampp folder, but you can always set that one as an alias. Open up your config and find: Code: DocumentRoot "/path/to/doc/root/" It will be currently pointing to whatever you have it set to, probably F:/xampp/htdocs. Change it to the path you wish to use, "F:/CodeIgniter/" Don't forget to change the directory access as follows for the document root: Code: # This should be changed to whatever you set DocumentRoot to. That way you can visit http://cidemo.com/xampp for your xampp folder, if you need access to it. |
Welcome Guest, Not a member yet? Register Sign In |