Forums » Ryzom Game on GNU/Linux »
403 Forbidden in Debian
Added by owen_a over 5 years ago
Hello everyone
I'm trying to setup the web side for the ryzom server. I've done exactly as it says on the tutorial, and even chmod 777 -R the entire projects folder where my ryzomcore folder is situated, however I keep receiving this error. No matter what I do, it does not work. The text below is what is inside my "/sites-available/default" file.
Listen 40916 <VirtualHost *:40916> <Directory "/root/projects/ryzomcore/code/ryzom/tools/server/"> Options +Indexes FollowSymLinks MultiViews IndexOptions FancyIndexing FoldersFirst NameWidth=* AllowOverride All Order allow,deny Allow from all </Directory> ServerAdmin admin@localhost DocumentRoot /root/projects/ryzomcore/code/ryzom/tools/server/www/ ServerName localhost </VirtualHost> <VirtualHost *:80> <Directory "/root/projects/ryzomcore/code/ryzom/tools/server/"> Options +Indexes FollowSymLinks MultiViews IndexOptions FancyIndexing FoldersFirst NameWidth=* AllowOverride All Order allow,deny Allow from all </Directory> ServerAdmin admin@localhost DocumentRoot /var/www ServerName localhost </VirtualHost>
As you can see, the code is clearly in the root folder (since I'm logged in as root and it is inside there).
Any ideas?
Replies (6)
RE: 403 Forbidden in Debian - Added by nimetu over 5 years ago
owen_a wrote:
As you can see, the code is clearly in the root folder (since I'm logged in as root and it is inside there).
You can't run docroot inside /root (unless apache is also running as 'root', but it's probably running as 'www-data')
RE: 403 Forbidden in Debian - Added by owen_a over 5 years ago
Oh ok then, so would adding a new user, AKA "ryzom" and then compiling the code under that user work?
RE: 403 Forbidden in Debian - Added by nimetu over 5 years ago
owen_a wrote:
Oh ok then, so would adding a new user, AKA "ryzom" and then compiling the code under that user work?
copy 'code/ryzom/tools/server' into '/var/www' and adjust paths in apache config and it should work.
RE: 403 Forbidden in Debian - Added by owen_a over 5 years ago
I issued the following command:
cp -R /root/projects/ryzomcore/code/ryzom/tools /var/www/ryzom
And made my "/etc/sites/available/default" look like so:
<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None 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 </VirtualHost> Listen 40916 <VirtualHost *:40916> <Directory "/var/www/ryzom/tools/server/"> Options -Indexes FollowSymLinks MultiViews IndexOptions FancyIndexing FoldersFirst NameWidth=* AllowOverride All Order allow,deny Allow from all </Directory> ServerAdmin admin@localhost DocumentRoot /var/www/ryzom/tools/server/www/ ServerName localhost </VirtualHost>
It still gives me a 403. I even chmodded the folder "/var/www/ryzom" to 777.
RE: 403 Forbidden in Debian - Added by owen_a over 5 years ago
Checked in error log...
[Sat Dec 08 14:22:17 2012] [error] [client 192.168.0.140] Directory index forbidden by Options directive: /var/www/ryzom/tools/server/www/ [Sat Dec 08 14:22:18 2012] [error] [client 192.168.0.140] File does not exist: /var/www/ryzom/tools/server/www/favicon.ico
RE: 403 Forbidden in Debian - Added by nimetu over 5 years ago
Your DocumentRoot are not set correctly, port 40916 probably must point to /var/www/ryzom/tools/server/www/login for game login to work
and port 80 should probably point to /var/www/ryzom/tools/server/www/admin for shard admin page
currently you getting 403 because /var/www/ryzom/tools/server/www directory has no index.html or index.php file
(1-6/6)