![]() |
Setup for Apache on Ubuntu Server - 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: Setup for Apache on Ubuntu Server (/showthread.php?tid=76582) |
Setup for Apache on Ubuntu Server - Schop - 05-28-2020 My apologies, I know this topic has been addressed several times already on this forum. However, I can't get my installation to work properly. This is my setup: I have an Ubuntu 18.04 server, with Apache. I've setup my virtual host like this: Code: <VirtualHost *:80> .env like this: Code: CI_ENVIRONMENT = development I installed the appstarter trough composer in /var/www/jules/appstarter/ , and I when i go to http://jules, I see the welcome page for CodeIgniter, so far so good. Now of course I want to remove index.php, so I've set $indexPage = ''; in Config/App.php I tried all sorts of different things for the RewriteBase directive in .htaccess, but no matter what I do, http://jules/login does not work, but http://jules/index.php/login does. What could be wrong? .htaccess in /var/www/jules/appstarter/public: Code: # Disable directory browsing For RewriteBase I've tried '/appstarter/', 'appstarter', '/appstarter', '/appstarter/public', '/', etc. RE: Setup for Apache on Ubuntu Server - captain-sensible - 05-30-2020 docs mention this: If a URL like /mypage/find/apple doesn’t work, but the similar URL /index.php/mypage/find/apple does, that sounds like your .htaccess rules (for Apache) are not set up properly, or the mod_rewrite extension in Apache’s httpd.conf is commented out. i'm on slackware so its not quite the same but i did have to fiddle with httpd.conf and note this is UN-commented. LoadModule rewrite_module lib64/httpd/modules/mod_rewrite.so //is yours ? RE: Setup for Apache on Ubuntu Server - dave friend - 05-30-2020 Because your VirtualHost defines the full path to "public" you do not need and should not use RewriteBase. |