如果我没有足够的经验,请原谅,但请相信我在决定问这个问题之前已经尝试了一整天:)
因此,我正在本地WAMP服务器上开发该站点,但是我想向我的朋友展示此站点,因此我需要可以从Internet访问此站点。
实际上,我只需要创建对网站的访问权限,而无需访问文件。
我正在运行WAMP的最新版本3.1.9
到目前为止我所做的:
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin example@email.com
ServerName demo.ddns.net
ServerAlias www.demo.ddns.net
DocumentRoot "${INSTALL_DIR}/www/demo_site"
ErrorLog "logs/mysite.log"
CustomLog "logs/mysite-access.log" common
<Directory "C:/wamp/www/demo_site">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
我还将此添加到了本地主机
127.0.0.1 demo.ddns.net
::1 demo.ddns.net
当我尝试查看它是否有效时,我输入:
demo.ddns.net:10005/demo_site
但不幸的是,它不起作用。我确定我在WAMP中缺少端口配置,但是我不知道在哪里包括我的10005端口以使WAMP服务器与我的动态DNS地址连接。
我已经尝试过了:
<VirtualHost *:80>
ServerAdmin example@email.com
ServerName demo.ddns.net:10005
ServerAlias www.demo.ddns.net:10005
DocumentRoot "${INSTALL_DIR}/www/demo_site"
ErrorLog "logs/mysite.log"
CustomLog "logs/mysite-access.log" common
<Directory "C:/wamp/www/demo_site">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
很长的帖子对不起,但是希望我已经解释清楚了。
如果你们能帮助我,我会很高兴。b
非常感谢!
最好的问候