TheJJ100100
Posts: 10
Joined: Sun Mar 16, 2014 8:12 pm

Apache Help

Sun Mar 16, 2014 8:14 pm

I have an apache server set up, but I can only access index.html, could someone say how to change this?

When I go to 192.168.0.42 -- RPi IP address -- I see the main page, index.html, but if I go to 192.168.0.42/testing.html it says 403 forbidden.



Forbidden

You don't have permission to access /Cars.html on this server.
Apache/2.2.22 (Debian) Server at 192.168.0.42 Port 80
Last edited by TheJJ100100 on Sun Mar 16, 2014 8:53 pm, edited 2 times in total.

ThomasS
Posts: 118
Joined: Thu Jan 23, 2014 7:05 pm
Location: Leeds
Contact: Website

Re: Apache Help

Sun Mar 16, 2014 8:33 pm

You can add other files to /var/www (to open file manager as root, click tools, then file manager as root, or similar). This should make them available on the server.
ThomasS

TheJJ100100
Posts: 10
Joined: Sun Mar 16, 2014 8:12 pm

Re: Apache Help

Sun Mar 16, 2014 8:38 pm

When I go to 192.168.0.42 -- RPi IP address -- I see the main page, index.html, but if I go to 192.168.0.42/testing.html it says 403 forbidden.



Forbidden

You don't have permission to access /Cars.html on this server.
Apache/2.2.22 (Debian) Server at 192.168.0.42 Port 80

User avatar
DougieLawson
Posts: 38447
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Apache Help

Sun Mar 16, 2014 9:25 pm

sudo -i
cd /var/www
chown -R www-data.www-data *
find . -type=d | xargs chmod 755
find . -type=f | xargs chmod 644
exit
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

TheJJ100100
Posts: 10
Joined: Sun Mar 16, 2014 8:12 pm

Re: Apache Help

Sun Mar 16, 2014 10:08 pm

Thanks, it worked!

Return to “Networking and servers”