Question

I'm trying to enable mod_rewrite on server. My web is located in folder /data/web/new-domovreality.sk/web. There are .htacces and index.php files in this folder.

My current

etc/apache2/sites-available/default

<VirtualHost *:80>

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

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
    AllowOverride All
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride All
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

I've read I think every instructions to enable it, but I'm not able to. Can someonehelp me? I'm doing this first time. Thanks

When I use phpinfo() there is mod_rewrite enabled.

Was it helpful?

Solution

So, the solution was to change the * to IP address, so in final

<VirtualHost *:80>

looks like this:

<VirtualHost 37.9.170.195:80>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top