5

I am trying to make a simple server for local PHP development with Vagrant on mac OS 10.9.4.

Vagrant is running inside the main "~/Sites" directory with "/var/www/html" on the guest pointing there. The Vagrantfile looks like this:

config.vm.box = "ubuntu/trusty64" config.vm.network "forwarded_port", guest: 80, host: 8080 config.vm.synced_folder ".", "/var/www/html" 

On Apache, "000-default.conf" contains the default stuff, plus:

<Directory "/var/www/html"> Options -Indexes +FollowSymLinks +MultiViews AllowOverride All Require all granted </Directory> 

mod_rewrite was activated with sudo a2enmod rewrite

The 'Sites' folder contains several websites based on Wordpress, Kirby, or Drupal. Each website's folder contains only the 'public' files and its own .htaccess (-> then to be uploaded to the 'public_html' directory of their own production servers).

Apache, Php and MySql are working well and the first page of each project is visible at localhost:8080/project, but it's impossible to navigate through the pages because url rewriting is not working (pages not found like there was no htaccess files).

What should I do to make the url rewriting work?

4
  • What does /var/log/apache2/error.log say on the Guest? Commented Mar 19, 2016 at 18:53
  • Have you tried to verify that mod_rewrite is really loaded? => stackoverflow.com/questions/9021425/… Commented Dec 30, 2016 at 20:41
  • Did you restart apache after sudo a2enmod rewrite? Commented Dec 30, 2016 at 20:41
  • Not sharing the "not working" .htaccess files leaves to answer the question a guessing game, so I only leave a link: RewriteBase Commented Jan 23, 2019 at 17:41

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.