Welcome Guest, Not a member yet? Register   Sign In
Unable to run codeigniter project in wamp virtual host.
#1

Hello!
My codeigniter project works fine in the localhost. I had to create a virtual host where I could run multiple projects in my local pc. when running the project from the virtual host I can see the login page (the first page of my project), after feeding in the user name and password in the login page the page, instead of taking me to the next page I get this error
Code:
Forbidden
You don't have permission to access / on this server.
I tried using xampp as well and the error I get when using xampp is
Code:
Object not found! The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated.
I am not sure where the mistake lies.  
This is the virtual host url for the loginpage
Code:
http://saseco.dev/
and this is where it leads to after clicking the login button
Code:
saseco.dev/<?=site_url('login/user_login');?>
This is the virtual host setting that I have

Code:
httpd-vhost.conf
Code:
NameVirtualHost *:80
<VirtualHost *:80>
   ServerAdmin [email protected]
   DocumentRoot "c:/Apache2/docs/dummy-host2.example.com"
   ServerName dummy-host2.example.com
   ErrorLog "logs/dummy-host2.example.com-error.log"
   CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
<Directory C:/www/saseco>
AllowOverride All
Order Deny,Allow
Allow from all
</directory>
<VirtualHost *:80>
DocumentRoot "C:\www\saseco"
ServerName saseco.dev
</VirtualHost>
My .htaccess file
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond $1 ^(application|system|private|logs)
RewriteRule ^(.*)$ index.php/access_denied/$1 [PT,L]
RewriteCond $1 ^(index\.php|robots\.txt|favicon\.ico|public|assets|css|js|images)
RewriteRule ^(.*)$ - [PT,L]
RewriteRule ^(.*)$ index.php/$1 [PT,L]
</IfModule>
<IfModule !mod_rewrite.c>
   ErrorDocument 404 /index.php
</IfModule>
I am not sure where the error is coming from so I have copied my .htaccess and virtual host config file for your reference. IOr ancy chance that the codes in my login page is not right. Any advice on this please
Reply
#2

What is the URL when you receive that message? To me, the following doesn't look right:
Code:
saseco.dev/<?=site_url('login/user_login');?>

The site_url() method should be providing the saseco.dev/ portion for you, so I would expect this to produce an invalid URL.

I generally keep each of my host configurations in a separate file. Additionally, the Directory configuration is usually inside the VirtualHost configuration, unless a directory is shared between multiple hosts. You may also need to make sure your opening and closing tags match in your server config file(s).
Reply
#3

(05-11-2015, 12:02 PM)mwhitney Wrote: What is the URL when you receive that message? To me, the following doesn't look right:

Code:
saseco.dev/<?=site_url('login/user_login');?>

The site_url() method should be providing the saseco.dev/ portion for you, so I would expect this to produce an invalid URL.

I generally keep each of my host configurations in a separate file. Additionally, the Directory configuration is usually inside the VirtualHost configuration, unless a directory is shared between multiple hosts. You may also need to make sure your opening and closing tags match in your server config file(s).
@mwhitney. sorry for the delay. saseco.dev/<?=site_url('login/user_login');?> is the url that I get when clicking on my login button.  I tried to work on the application today (after two days) now I cant even access the login screen. It says "Forbidden You don't have permission to access / on this server." Have a lot of trouble shooting ahead of me. Thanks for your reply.
Reply
#4

@mwhitney, I am not sure where my first reply has gone. This is the url "saseco.dev/<?=site_url('login/user_login');?>" I get after clicking the submit button in my log in page. Been two days since I stopped working for the project now when going back to it, I cannot even see the log in page. I Straight away get a page displaying this 403 forbidden message "ou don't have permission to access / on this server." Things(problem) keep piling up. Thank you for the response!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB