Enable .htaccess on Ubuntu 14.10, Apache / 2.4.10

0

I'm trying to enable .htacces on Ubuntu 14.10, but I saw at the time of setting up the new version of Apache / 2.4.10 the configure mode 'is different from the previous ones.

I'm putting the files in / var / www /

I've tried it already but I'm not getting it to work.

apache2ctl -S:

VirtualHost configuration:
*:80                   127.0.1.1 (/etc/apache2/sites-enabled/000-default.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex rewrite-map: using_defaults
Mutex default: dir="/var/lock/apache2" mechanism=fcntl 
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33

000-default.conf:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/

    <Directory "/var/www/">
        AllowOverride All
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

/etc/apache2/apache2.conf:

<Directory />
    Options FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

<Directory /usr/share>
    AllowOverride All
    Require all granted
</Directory>

<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>
    
asked by anonymous 24.06.2015 / 03:35

2 answers

0

Edit:

/etc/apache2/apache2.conf

Remove comment "#" from line:

AccessFileName .htaccess

Restart apache2:

service apache2 restart

    
24.06.2015 / 04:32
0

Solution:

In the terminal going to / etc / apache2 / sites-available / accessing the 000-default file I added below: documentroot / var / www

<Directory /var/www/>
  Options Indexes FollowSymLinks
  AllowOverride All
  Order allow,deny
  allow from all

    
24.06.2015 / 04:58