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.$domain.com 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?

  • 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 “http://www.pouya.com:8080/”, “http://www.project42.com:8080/”, or “http://www.puppy.com:8080/”? // Also, telling us what browser you’re using might be helpful. Sep 20, 2012 at 21:34


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.