When I try to access the /var/www/ folder through apache, which is at from my Windows Machine, I get this error, even though it was working before with no changes:

Forbidden

You don't have permission to access / on this server.
Apache/2.2.14 (Ubuntu) Server at tom-server Port 80

This is my httpd.conf file:

<Directory "/var/www/">
Order Allow,Deny
Allow from all
</Directory>

What could I do to fix it?
The apache server is on my Ubuntu Server(10.04.01) box and the computer that it trying to connect to it is running Windows XP.

Dani AI

Generated

A 403 on “/” most often means Apache itself can’t read or serve the DocumentRoot rather than a network/connectivity problem. ’s pointer toward filesystem permissions is the right starting place, but it’s worth a short checklist that narrows down the usual root causes in order: Apache-visible filesystem permissions (including execute bits on parent dirs), a missing DirectoryIndex with directory listings disabled, an .htaccess or site config explicitly denying access, symlink/target permissions, or a local security profile (AppArmor/SELinux) preventing access.

Quick, focused checks that usually reveal the cause:

sudo tail -n 50 /var/log/apache2/error.log

ls -ld / /var /var/www
stat -c "%A %U %G" /var/www

# run a command as Apache's user to verify access
sudo -u www-data ls -l /var/www

Other useful diagnostics and fixes to try (without making directories globally writable): confirm the actual DocumentRoot (follow any symlink target), search for local deny rules, and verify there is an index file or that directory indexing is intentionally allowed. Example checks:

readlink -f /var/www
grep -R --line-number -i "deny from\|deny" /var/www /etc/apache2 2>/dev/null
ls -la /var/www | head

If none of the above shows the problem, check for AppArmor denials in syslog or via aa-status, and remember to reload/restart Apache after changes. Avoid using overly permissive modes (e.g., 0777) as a “fix.” The Apache error log will usually contain a clear “permission denied” line that points to which layer (filesystem, .htaccess, security profile) is blocking access.

check to make sure that the directory /var/www/ is readable (at least 444, but more than likely it should be 755) and check the owner and group as well.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.