将WAMP服务器打开到其他计算机

时间:2015-11-27 13:10:55

标签: php apache public

出于某种原因,我在WAMP安装上放置的站点只能由同一网络上的计算机访问。我想要做的是打开它,以便每个人都可以访问它。这是我的配置:

ServerSignature On
ServerTokens Full

ServerRoot "c:/wamp/bin/apache/apache2.4.9"

Define APACHE24 Apache2.4

Listen 0.0.0.0:80
Listen [::0]:80

LoadModule php5_module "c:/wamp/bin/php/php5.5.12/php5apache2_4.dll"

<IfModule unixd_module>
User daemon
Group daemon

</IfModule>


ServerAdmin admin@example.com

ServerName localhost:80

HostnameLookups Off

DocumentRoot "c:/wamp/www/"

<Directory />
    AllowOverride none
    Require all granted
</Directory>


<Directory "c:/wamp/www/">
    Options Indexes FollowSymLinks

    AllowOverride all


Require all granted
</Directory>

<IfModule dir_module>
    DirectoryIndex index.php index.php3 index.html index.htm
</IfModule>

<Files ".ht*">
    Require all denied
</Files>

ErrorLog "c:/wamp/logs/apache_error.log"

LogLevel warn

<IfModule log_config_module>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common

    <IfModule logio_module>
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>

    CustomLog "c:/wamp/logs/access.log" common

</IfModule>

<IfModule alias_module>
    ScriptAlias /cgi-bin/ "c:/wamp/bin/apache/apache2.4.9/cgi-bin/"

</IfModule>

<IfModule cgid_module>
</IfModule>

<Directory "c:/wamp/bin/apache/apache2.4.9/cgi-bin">
    AllowOverride None
    Options None
    Require all granted
</Directory>

<IfModule mime_module>
    TypesConfig conf/mime.types

    AddEncoding x-compress .Z
    AddEncoding x-gzip .gz .tgz
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .php3

</IfModule>

EnableSendfile off

AcceptFilter http none
AcceptFilter https none

Include conf/extra/httpd-autoindex.conf

<IfModule proxy_html_module>
Include conf/extra/proxy-html.conf
</IfModule>

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

Include "c:/wamp/alias/*"

1 个答案:

答案 0 :(得分:0)

更改防火墙中的端口设置并确认您的IP是静态的,并检查Apache配置,最后使用wamp online