ci 4 not found controller in linux - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: ci 4 not found controller in linux (/showthread.php?tid=76456) |
ci 4 not found controller in linux - gra - 05-14-2020 I made a project with codeigniter 4.0.0 rc 3 On windows it works. On Linux debian 10 not run. in my .htaccess they have changed Code: RewriteRule ^(.*)$ index.php/$1 [L] Code: public $baseURL = 'http://my_domain.loc/'; I'm using php 7.3 I have enabled rewrite_module in Apache 2. sudo a2enmod rewrite After enabling mod_rewrite, I restarted the server with the php function apache_get_modules () I print the list of modules. [27] => mod_rewrite. in the browser http: //my_domain.loc/index.php default is it works. click the buttons call MY_Controller in my browser http: //my_domain.loc/MY_Controller is not working Message: NOT FOUND The requested URL was not found on this server. This only in Linux. my conf host Apache 2 Code: <VirtualHost *:80> my .htaccess in the public folder PHP Code: # Disable directory browsing my .htaccess project folder PHP Code: # Disabilita la navigazione nella directory my index.php in pubblic folder PHP Code: <?php my index.php in project folder PHP Code: <?php RE: ci 4 not found controller in linux - captain-sensible - 05-15-2020 i have three directories in /var/www/htdocs (apache on slackware current) each with a different project using CI4. The way i access each is via the i.p I left .htacess in public alone since i'm using http for localhost and then tweak things for live. An example of my virtual host is: <VirtualHost 127.0.0.2:80> # ServerAdmin [email protected] ErrorLog "/var/log/httpd/CI.org-error_log" # CustomLog "/var/log/httpd/dummy-host.example.com-access_log" common <Directory "/var/www/htdocs/CI/public"> Order allow,deny Allow from All AllowOverride All Require all granted </Directory> ServerName CI.org DocumentRoot "/var/www/htdocs/CI/public" ServerAlias www.CI.org </VirtualHost> <VirtualHost 127.0.0.3:80> so basically when i put 127.0.0.3 into address bar of browser i see my web page. for the base url in app/config/app.php i use : public $baseURL = 'http://127.0.0.3'; |