Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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:

Forbidden

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>
    #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
</VirtualHost>

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 “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. –  Scott Sep 20 '12 at 21:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.