0

What I need

I need Apache to deliver my website website.de with the files placed in /var/www/html/private/koken.

Problem

As for my other website I have a working configuration with VHosts I also tried it that way for this one.

On the website in question I installed the great CMS of koken.me. After setting up the VHosts for my server I´m getting 500 Internal Server Error with a log message of Request exceeded the limit of 10 internal redirects with my DocumentRoot /var/www/html/private/koken. With the DocumentRoot of /var/www/html/private it works (delivers my test index.html). With the working DocumentRoot I have to type website.de/koken and then koken works. But I don´t want to type that appendix.

What I tried

Changing settings in the VHosts config. But nothing else yet. My config as of now looks like this:

# Personal website
#
<VirtualHost *:80>
    ServerName website.de
    DocumentRoot /var/www/html/private/koken
</VirtualHost>

<VirtualHost *:80>
    ServerName www.website.de
    Redirect permanent / http://website.de/
</VirtualHost>

Question

How can I instruct Apache to deliver the index.php in the koken folder when I type in my website name website.de?

pnuts
  • 58,317
  • 11
  • 87
  • 139
Karl
  • 410
  • 11
  • 25

2 Answers2

1

My VHosts config was fine.

The problem was the koken .htaccess file.

As per my Apache config the DocumentRoot points to the files inside the koken folder on the server.

But the .htaccess of koken states a RewriteBase of /koken so the requests are pointing to a non-existing place (that is koken/koken/).

Therefore I had to write RewriteBase / and do a find/replace on /koken/ to /.

Now koken is aligned to my Apache pointer and the site runs as fresh as daisy.

Hope I can help someone :-)

Karl
  • 410
  • 11
  • 25
0

If I understand this right, the following should fit your needs:

<VirtualHost *:80>
    ServerName website.de
    ServerAlias www.website.de
    DocumentRoot /var/www/html/private/koken
</VirtualHost>

The second virtual host is not needed as far as I can see it.

frank
  • 1,217
  • 2
  • 10
  • 18
  • Thanks, FrW, for your commitment. However it was something different. See my answer. – Karl Dec 06 '15 at 21:16