[SOLVED]local installation moving system and application folders access denied |
[eluser]Cgull[/eluser]
Hello, Using Codeigniter 2.1.3 WAMP 2.2 php 5.3.13 apache 2.2.22 I am following a tutorial and trying to move the system and application folders. So my folders look like this: c:\sites\mysite\ - system - application - public_html\ - assets index.php htaccess In my index file: Code: $system_path = '../system'; In my config file: Code: $config['base_url'] = ''; My hosts file: 127.0.0.1 mysite.dev My vhosts file: Code: <VirtualHost *:80> My htaccess inside public_html: Code: RewriteEngine On My site worked fine if all the folders were inside mysite and I did not have a public_html folder. Now when trying to get to the site http://mysite.dev I get the notorious error 403 Forbidden You don't have permission to access / on this server. Can someone please help?
[eluser]mackski[/eluser]
Sounds like folder permissions. Check they are correct, and apache can access those moved folders.
[eluser]Cgull[/eluser]
I'm sorry but what do you mean? Do I need to do anything else in hosts or vhosts file for the system and application folders? The c:/sites/mysite is correct as it works fine if I don't move the system and application folders. Not sure what folders permissions I need to check, how and how to fix it. Thanks.
[eluser]pickupman[/eluser]
If the public_html folder is inside your sites/mysite folder (c:/sites/mysite/public_html), then your need to change our Directory entry to: Code: <Directory c:/sites/mysite/public_html> Then restart Apache. You may also try making the permission a little easier, rather than Allow 127.0.0.1, at first to eliminate that issue as well.
[eluser]Cgull[/eluser]
Thank you, that helped, but now when I go to mysite.dev I get page not found. What I have in the public_html folder is: index.php htaccess assets folder license.txt And I changed the path to system and application in the index file to: ../system and ../application Any idea what is wrong now?
[eluser]Cgull[/eluser]
Please ignore this post, made a mistake in the vhosts file. Another thing I tried: I copied the whole mysite folder and renamed it to a different name. Did all the hosts and vhosts changes to this name, now this one shows me the WAMP page when I try to browse it. newname.dev goes to WAMP server's page. mysite.dev give a page not found error The problem of page not found is still there.
[eluser]pickupman[/eluser]
Have you entered the domains in your windows hosts file (C:\windows\system32\drivers\etc\hosts), so that they resolve locally to your machine? Are you getting an Apache 404 not found or a CI 404 error not found? The fact that you are seeing the Wamp server page means you likely have the <Directory> path wrong in your vhosts file. Rather than trying to keep changing folder paths, put the files where you like them, and working out the configuration to get it to work. Otherwise, you will keep making changes and not accomplish anything.
[eluser]Cgull[/eluser]
Hi, Ok, to avoid any confustion, the situation now is like this: My hosts file: Code: 127.0.0.1 mysite.dev My vhosts file: Code: <VirtualHost *:80> In mysite/public_html/index.php file: Code: $system_path = '../system'; mysite/public_html/htaccess file: Code: RewriteEngine On In mysite/application/config/config.php file: Code: $config['index_page'] = ''; In mysite/application/config/routes.php file: Code: $route['default_controller'] = "page"; Going to: http://mysite.dev - getting 404 error. Thank you
[eluser]pickupman[/eluser]
I just setup the exact same structure as your have shown, and it is working. Your setup seems correct. As I had asked before, are you getting the Apache 404 error (usually white background with black text), or the CI 404 error which is a gray outlined box with the 404 message inside the box? The answer is important as to where the problem is. Please also note that setting your 404_override the same as your default_controller may also cause confusion. My folder structure looks like c:\sites\mysite application\ --application_folder stuff public_html\ --.htaccess --index.php system\ --system_folder stuff
[eluser]Shone[/eluser]
I had the same problem, and this post helped me. Thanks |
Welcome Guest, Not a member yet? Register Sign In |