Welcome Guest, Not a member yet? Register   Sign In
[Solved] deploying codeigniter application
#1

(This post was last modified: 09-25-2015, 07:38 AM by Hyper-X.)

While deploying my application, I get this error
Code:
Error 403 Forbideden
you don't have acesss to /cardsManagerApp/ on this server

Here is my .htaccess file content
Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [L]

The server is under proxy configuration. I'm wondering if this is a problem.
I apply many suggestions but it doesn't work.
Please help. This error is killing my project.
Reply
#2

(09-23-2015, 12:50 AM)Hyper-X Wrote: While deploying my application, I get this error

Code:
Error 403 Forbideden
you don't have acesss to /cardsManagerApp/ on this server

Here is my .htaccess file content

Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [L]

The server is under proxy configuration. I'm wondering if this is a problem.
I apply many suggestions but it doesn't work.
Please help. This error is killing my project.

You should look at your server configuration. I dont see any way to have a forbiden acces while deploying your application if it works on local server configuration. It is not due to CI.
Maybe something wrong in the proxy server configuration... like ip restriction or something like that.
Reply
#3

There are a few potential reasons for this to occur:
1) Does it work if you specify index.php in your URL?
If it does, then .htaccess is probably the right place to start trying to fix the problem, but first you should make sure the server is configured to allow you to use an .htaccess file in the first place. This is usually controlled by the AllowOverride directive in an Apache .conf file. You may need to ensure that mod_rewrite is enabled on the server as well.

The requirements to configure mod_rewrite can vary drastically based on the version and configuration of the server, where you are configuring it (for example, .htaccess vs. a .conf file), and a handful of other things. In some cases, you need a question mark after index.php in your RewriteRule. Sometimes you need a RewriteBase statement before your RewriteCond/RewriteRule statements (but after "RewriteEngine on").

2) If it does not work with index.php specified in the URL, did you place the index.php file in the directory indicated by the DocumentRoot configuration in Apache? If so...

3) Are the permissions set properly for the files and directories you uploaded to the server?
There's a lot of good information on setting permissions here:
http://serverfault.com/questions/357108/...-webserver
Reply
#4

Can you see the default codeigniter welcome page? if yes, next can you see the welcome page without having index.php in the url?
Reply
#5

thank you all for your anserwers. I resolved the problem.
As mwhitney wrote,
Quote:This is usually controlled by the AllowOverride directive in an Apache .conf file.
I checked the configuration file. In the past time, I've modified only apache\apache2.4.9\conf\httpd.conf.(with override all and allow from all)
But now I also modify this file apache\apache2.4.9\conf\original\httpd.conf with the same option.
Other modification:
I change in httpd.conf this line
Code:
<IfModule dir_module>
   DirectoryIndex  index.php index.php3 index.html index.htm
</IfModule>

To
Code:
<IfModule dir_module>
   DirectoryIndex  index.php3 index.html index.htm index.php
</IfModule>
I restart wamp and it work fine. I hope my reply can help those who have the same problem.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB