Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

These are my VM setup:

HOST: windows 7 ultimate 32bit
GUEST: CentOs 6.3 i386
Virtualization soft: Oracle virtualBox 4.1.22
Networking: NAT -> (PORT FORWARD: HOST:8080 => GUEST:80)
Shared Folder: centos

all the project files goes into shared folder and for each project file a virtualhost conf file is created in /etc/httpd/conf.d/ like /etc/httpd/conf.d/$domain

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: http://www.$domain:8080/ all i see is:


You don't have permission to access / on this server.
Apache/2.2.15 (CentOS) Server at www.$ Port 8080

A sample Virtual Host conf file:

<VirtualHost *:80>
    DocumentRoot /media/sf_centos/path/to/public_html
    ServerAdmin webmaster@$domain
    ServerName www.$domain
    ServerAlias $domain *.$domain

    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

centos shared folder is availabe to guest at /media/sf_centos These are file permissons for sf_centos:

drwxrwx--- root vboxsf

vboxsf group includes: apache and root

So these are my questions:

1- How to solve Forbidden Problem?

2- How to setup both host and guest firewalls?

3- How can i improve this developement environment to simulate production environment as much as possible specially security improvements?

share|improve this question
Try to represent what's real and what’s a placeholder more clearly. For example, you say, “I type for example: http://www.$domain:8080/”. Are you typing “http://www.$domain:8080/”? Or are you typing something like “”, “”, or “”? // Also, telling us what browser you’re using might be helpful. – Scott Sep 20 '12 at 21:34

You must log in to answer this question.

Browse other questions tagged .