-1

I managed to setup a virtual host, by using the following configuration:

<VirtualHost *:80>
    ServerName entwicklung.hausfux
    ServerAdmin [email protected]
    DocumentRoot /srv/www/vhosts/hausfux/
    ErrorLog /var/log/apache2/hausfux_error.log
    CustomLog /var/log/apache2/hausfux_access.log common

    <Directory "/srv/www/vhosts/hausfux/">
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

But now all urls include the path to the virtual host directory /srv/www/vhosts/hausfux/ e.g.:

http://entwicklung.hausfux/srv/www/vhosts/hausfux/skin/frontend/venedor/default/css/styles-venedor.css net::ERR_ABORTED 404 (Not Found)

instead of:

http://entwicklung.hausfux/skin/frontend/venedor/default/css/styles-venedor.css

This is my .htaccess file:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
</IfModule>

What am I doing wrong?

2
  • Your web application decides what its URLs look like. This has nothing to do with Apache. Oct 19, 2018 at 16:13
  • I am using magento 1.9. You only have to enter the base url. I entered the vhost name http://entwicklung.hausfux/ as base url as usual, which was always all I needed on WAMP when doing it with windows.
    – Black
    Oct 20, 2018 at 7:17

1 Answer 1

-1

I was able to solve it. The /media folder had not enough permission. I have set it to 777 now it works.

Solution found here.

3
  • 1
    The post you linked to has a serious error, which you have copied: It doesn't just make the folder writable by the apache user, it makes the folder writable by everyone. DO NOT DO THIS. It opens a massive security hole. Oct 22, 2018 at 13:10
  • @MichaelHampton, Thats incorrect, I tried other permissions too, it only works with 777. I also tried 774 without success. The owner is set to my ftp user and the group to wwwrun
    – Black
    Oct 23, 2018 at 8:05
  • Then you can fix either the owner or group, or use ACLs to make the permissions correct without having the security hole. I recommend ACLs. Oct 23, 2018 at 13:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .