• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Problem with nginx and codeigniter routes

DarkKikies

Basic Pleskian
I developed a small cms with codeigniter and in local use xampp * * works perfectly.

When I put on my vps plesk mounting nginx and I had problems with the controller.
They are not read.

Every link I post except that automatically reads codeigniter and the default I return a 404 error.

Schermata 2015-06-12 alle 13.31.51.png

If you read the thread I opened on the forum of CI http://forum.codeigniter.com/thread-62112.html

You will realize that I have tried a lot 'of configurations but none has been good for me.

I beg you, you help me solve the problem?

P.S. on vps I have several active domains.

My controller is:
PHP:
$route['default_controller'] = 'home';
$route['404_override'] = '';
$route['page/(:any)'] = 'page/thread/$1';
$route['translate_uri_dashes'] = FALSE;

$route['acp'] = 'acp/user/login';
$route['acp/page/edit/(:any)'] = 'acp/page/edit/$1';
$route['acp/page/delete/(:any)'] = 'acp/page/delete/$1';
$route['acp/menu/edit/(:any)'] = 'acp/menu/edit/$1';
$route['acp/menu/edit/(:any)'] = 'acp/menu/delete/$1';
 
Last edited:
I developed a small cms with codeigniter and in local use xampp * * works perfectly.

When I put on my vps plesk mounting nginx and I had problems with the controller.
They are not read.

Every link I post except that automatically reads codeigniter and the default I return a 404 error.

View attachment 9819

If you read the thread I opened on the forum of CI http://forum.codeigniter.com/thread-62112.html

You will realize that I have tried a lot 'of configurations but none has been good for me.

I beg you, you help me solve the problem?

P.S. on vps I have several active domains.

My controller is:
PHP:
$route['default_controller'] = 'home';
$route['404_override'] = '';
$route['page/(:any)'] = 'page/thread/$1';
$route['translate_uri_dashes'] = FALSE;

$route['acp'] = 'acp/user/login';
$route['acp/page/edit/(:any)'] = 'acp/page/edit/$1';
$route['acp/page/delete/(:any)'] = 'acp/page/delete/$1';
$route['acp/menu/edit/(:any)'] = 'acp/menu/edit/$1';
$route['acp/menu/edit/(:any)'] = 'acp/menu/delete/$1';
I haven't used CI, but unless you've specified nGinx to parse php on that domain, I'm not sure it's going to work at all. In any case, make sure the correct settings are specified in the "Additional nginx directives" configuration in Web server settings for the domain in question. Moreover, try to see if Apache is parsing the CI page you're interested in.
 
Sisi, I know where to place the additional configuration for the domain, thanks. :)

I tried to disable nginx to operate only apache, but I have the same problem. Yet everything works on xampp perferzione.


I want to specify that 'acp' routes is in a folder located inside of the controller.
While page is only the name of the controller.
 
Sisi, I know where to place the additional configuration for the domain, thanks. :)

I tried to disable nginx to operate only apache, but I have the same problem. Yet everything works on xampp perferzione.


I want to specify that 'acp' routes is in a folder located inside of the controller.
While page is only the name of the controller.
Ok, if it's just a test then, why not delete and re-create it? You can also try to re-configure it using Plesk's CLI:
Code:
"%plesk_bin%"\websrvmng --reconfigure-vhost –vhost-name=domain.com
 
I would try to solve the problem without reconfigure anything.

Configuration is clean without any change and it all works normally.

I would just solve this problem with a configuration nginx or something...
 
Back
Top