Windows 7 403在Apache(CentOS)服务器上禁止作为Windows 7上的来宾

Windows 7 403在Apache(CentOS)服务器上禁止作为Windows 7上的来宾,windows-7,centos,virtualbox,Windows 7,Centos,Virtualbox,以下是我的虚拟机设置: 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 所有项目文件都进入共享文件夹,每个项目文件都会在/etc/httpd/conf.d/中创建一个virtu

以下是我的虚拟机设置:

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
所有项目文件都进入共享文件夹,每个项目文件都会在
/etc/httpd/conf.d/
中创建一个virtualhost conf文件,如
/etc/httpd/conf.d/$domain

如果我键入例如:
http://www.$domain:8080/
我看到的是:

Forbidden

You don't have permission to access / on this server.
Apache/2.2.15 (CentOS) Server at www.$domain.com Port 8080
虚拟主机配置文件示例:

<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>
vboxsf
组包括:
apache
root

以下是我的问题:

1-如何解决禁止的问题

2-如何设置主机和来宾防火墙

3-如何改进此开发环境以尽可能地模拟生产环境,特别是安全改进?

对于#1/2:这是一个权限问题,因为VirtualBox使用的是自动装载方法。您必须手动安装,而不是自动安装

suomynona的帖子(第三次回复)对解决这个问题有一些分步说明:

至于#3,一种标准做法是拥有一台尽可能模拟生产的临时服务器(相同的操作系统、相同的更新、版本等)。这将允许您在部署到生产环境之前,从本地开发环境部署以进行集成测试。有时,我们甚至会将开发虚拟机设置为在版本/兼容性问题可能导致头痛的更复杂项目中使用与生产相同的操作系统

drwxrwx--- root vboxsf