0

In my attempt to get my Drupal alias links to work I have narrowed it down to the fact that the mod_rewrite module is not installed. I uncommented the LoadModule rewrite_module libexec/apache2/mod_rewrite.so as well as LoadModule php5_module libexec/apache2/libphp5.so. I have also changed AllowOverride None to AllowOverride All in every instance it appears in the httpd.conf file. I then restarted apache and I still cannot run this command: sudo a2enmod rewrite. Everytime I run it I get command not found error. What am I doing wrong, my username.conf also has the code listed below.

<Directory "/Users/username/Sites/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

Any help would very appreciated.

Tyler

Tyler
  • 73
  • 2
  • 11
  • I think I found the answer that you are looking for http://stackoverflow.com/questions/869092/how-to-enable-mod-rewrite-for-apache-2-2 if that does not work try this http://serverfault.com/a/455892/305162 – Alex Lowe Nov 18 '15 at 01:26
  • @Alex I took a look at that and it didn't seem to help, I'm wondering if there is a bigger problem, because I can't run any apache commands, I tried reinstalling apache and I couldn't even run this command sudo serveradmin stop web. Am I possibly running two instances of apache that I don't know about? – Tyler Nov 18 '15 at 01:37

1 Answers1

0

Go to the terminal and type sudo apachectl stop and then sudo apachectl start and see what happens.

Alex Lowe
  • 783
  • 3
  • 20
  • 43
  • I ran sudo apachectl -k restart and sudo apachectl restart and everything worked fine. I ran phpinfo() and it said mod_rewrite is loaded. It doesn't seem write that php says its loaded but I still can't call the command to install it. – Tyler Nov 18 '15 at 06:53
  • Go to this answer and see if it works http://stackoverflow.com/a/17869097/4700944 – Alex Lowe Nov 18 '15 at 15:14