Reputation: 1316
I've successfully installed following webinterface: https://github.com/deStrO/eBot-CSGO-Web
I've configured the Apache vHost as shown:
<VirtualHost *:80>
ServerAdmin <email>
DocumentRoot /var/www/ebot-web/web
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
/var/www/ebot-web/ looks like this:
# ls -lha /var/www/ebot-web/
total 56K
drwxr-xr-x 10 www-data www-data 4.0K Dec 26 16:27 .
drwxr-xr-x 4 root root 4.0K Dec 26 16:22 ..
drwxr-xr-x 4 www-data www-data 4.0K Apr 3 2015 apps
drwxr-xr-x 4 www-data www-data 4.0K Dec 26 19:30 cache
drwxr-xr-x 3 www-data www-data 4.0K Dec 26 18:22 config
drwxr-xr-x 4 www-data www-data 4.0K Dec 26 19:30 data
-rw-r--r-- 1 www-data www-data 41 Apr 3 2015 .gitignore
drwxr-xr-x 7 www-data www-data 4.0K Apr 3 2015 lib
drwxr-xr-x 6 www-data www-data 4.0K Apr 3 2015 plugins
-rw-r--r-- 1 www-data www-data 1.1K Apr 3 2015 README.md
-rw-r--r-- 1 www-data www-data 446 Apr 3 2015 symfony
drwxr-xr-x 4 www-data www-data 4.0K Apr 3 2015 test
-rw-r--r-- 1 www-data www-data 2.1K Apr 3 2015 TODO
drwxr-xr-x 6 www-data www-data 4.0K Dec 26 19:29 web
/var/www/ebot-web/web/ looks like this:
# ls -lha /var/www/ebot-web/web/
total 48K
drwxr-xr-x 6 www-data www-data 4.0K Dec 26 19:29 .
drwxr-xr-x 10 www-data www-data 4.0K Dec 26 16:27 ..
-rw-r--r-- 1 www-data www-data 235 Apr 3 2015 admin.php
drwxr-xr-x 3 www-data www-data 4.0K Apr 3 2015 css
-rw-r--r-- 1 www-data www-data 4.7K Apr 3 2015 favicon.png
-rw-r--r-- 1 www-data www-data 595 Dec 26 19:24 .htaccess
drwxr-xr-x 6 www-data www-data 4.0K Apr 3 2015 images
drwxr-xr-x 2 www-data www-data 4.0K Apr 3 2015 img
-rw-r--r-- 1 www-data www-data 236 Apr 3 2015 index.php
drwxr-xr-x 3 www-data www-data 4.0K Apr 3 2015 js
-rw-r--r-- 1 www-data www-data 26 Dec 26 19:29 robots.txt
I'm able to visit the web interface by opening http://hostname/ and the admin backend works fine. But at the frontend I've the problem, that all URLs aren't working. I always receive following error message from my browser:
404 Not Found - The requested URL /credits was not found on this server.
All URLs are linked like this one: http://hostname/credits
Well... The site is accessible, if I open it manually with http://hostname/index.php/credits.
I think there is an issue with the .htaccess file, but I'm not sure and don't have the needed skills for.
/var/www/ebot-web # find . -name .htaccess
./web/.htaccess
./lib/vendor/symfony/lib/task/generator/skeleton/project/web/.htaccess
Here is the content of the /var/www/ebot-web/web/.htaccess file:
Options +FollowSymLinks +ExecCGI
<IfModule mod_rewrite.c>
RewriteEngine On
# uncomment the following line, if you are having trouble
# getting no_script_name to work
#RewriteBase /
# we skip all files with .something
#RewriteCond %{REQUEST_URI} \..+$
#RewriteCond %{REQUEST_URI} !\.html$
#RewriteRule .* - [L]
# we check if the .html version is here (caching)
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
# no, so we redirect to our front web controller
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
I've uncommented the above lines as suggested, but it didn't changed anything. The web-server log is empty, also if I enable warn log level.
The issue is, that the "index.php" is missing in the URL. But the rewrite rule should insert this, or not?
The rewrite module is enabled:
# a2enmod rewrite
Module rewrite already enabled
Can somebody help me?
Upvotes: 0
Views: 464
Reputation: 1316
Damn. I had to allow such changes by .htaccess in the vHost configuration. I've added this inside the vHost VirtualHost configuration:
<VirtualHost *:80>
...
<Directory /var/www/ebot-web/web>
AllowOverride All
</Directory>
...
</VirtualHost>
Now it's working well! :)
Upvotes: 1