Using Apache2 to set up a basic webpage
- by mrhatter
I am having a problem with a test page I set up for my website. The config file (index.html) looks like this
<html>
<head>
<title>Welcome to website.net!</title>
</head>
<body>
<h1>Success! The website.net virtual host is working!</h1>
</body>
</html>
Which should display a page like this in my browser when I navigate to www.mywebsite.net
Welcome to website.net!
Success! The website.net virtual host is working!
However I get a 403 "forbidden" error when I navigate to the page. What am I missing? I have the directory installed on /var/www/mywebsite.net/public_html/index.html
I have the permissions of the /var/www directory set to 755 so that others can read and exicute it but it does not seem to be working. I also have port 80 open on my iptable. The server is a VPS server if that makes a difference however I have added a DNS record for the ip address.
Any help is appreciated!
UPDATE:
Here is my virtual host configuration file "mywebsite.net.conf"
<VirtualHost *:80>
# Admin email, Server Name (domain name), and any aliases
ServerAdmin [email protected]
ServerName www.mywebsite.net
ServerAlias mywebsite.net
# Index file and Document Root (where the public files are located)
DirectoryIndex index.html index.php
DocumentRoot /home/myusername/public/mywebsite.net/public
# Log file locations
LogLevel warn
ErrorLog /home/mysuername/public/mywebsite.net/log/error.log
CustomLog /home/myusername/public/mywebsite.net/log/access.log combined
<Directory /home/myusername/public/mywebsite.net/public>
Options Indexes ExecCGI Includes FollowSymLinks MultiViews
AllowOverride All
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>