title: 403 Forbidden on Apache (CentOS) Server as GUEST On Windows 7
body: <p>These are my VM setup:</p>
  
  <pre><code>HOST: windows 7 ultimate 32bit
  GUEST: CentOs 6.3 i386
  Virtualization soft: Oracle virtualBox 4.1.22
  Networking: NAT -&gt; (PORT FORWARD: HOST:8080 =&gt; GUEST:80)
  Shared Folder: centos
  </code></pre>
  
  <p>all the project files goes into shared folder and for each project file a virtualhost conf file is created in <code>/etc/httpd/conf.d/</code> like <code>/etc/httpd/conf.d/$domain</code> </p>
  
  <p>I wasn't able to see anything in my browser before disabling both windows firewall and iptables in centos after that if i type for example: <code>http://www.$domain:8080/</code> all i see is:</p>
  
  <pre><code>Forbidden
  
  You don't have permission to access / on this server.
  Apache/2.2.15 (CentOS) Server at www.$domain.com Port 8080
  </code></pre>
  
  <p>A sample Virtual Host conf file:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      #General
      DocumentRoot /media/sf_centos/path/to/public_html
      ServerAdmin webmaster@$domain
      ServerName www.$domain
      ServerAlias $domain *.$domain
  
      #Logging
      ErrorLog /var/log/httpd/$domain-error.log
      CustomLog /var/log/httpd/$domain-access.log combined
  
      #mod rewrite
      RewriteEngine On
      RewriteLog /var/log/httpd/$domain-rewrite.log
      RewriteLogLevel 0
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p><code>centos</code> shared folder is availabe to guest at <code>/media/sf_centos</code>
  These are file permissons for <code>sf_centos</code>:</p>
  
  <pre><code>drwxrwx--- root vboxsf
  </code></pre>
  
  <p><code>vboxsf</code> group includes: <code>apache</code> and <code>root</code></p>
  
  <p>So these are my questions:</p>
  
  <p>1- How to solve Forbidden Problem?</p>
  
  <p>2- How to setup both host and guest firewalls?</p>
  
  <p>3- How can improve this development environment to simulate production environment as much as possible specially security improvements?</p>