• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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