Apache local and LAN access settings
Recently done project needs colleague Ajax project to me, because it is a test environment, so I need to be able to access my server. My server directly uses the Wampserver. Because there is no contact, so Baidu a bit, are not successful, and later read the manual. And now I'm going to share it. . (Estimated knowledge is more old, after all, now use more nginx.) Company or IIS server--!)
Extranet access Settings
If the Vhosts module is not turned on, the general access directory refers to your www directory. httpd.conf inside you'll see a section like this
- <directory Path to your www>
- Configuration Items
- </Directory>
-
- Order deny allow
- Allow from all ....
- #第一个是设置访问权限的.
- Options Indexes FollowSymLinks
- #第二个是设置访问目录的时候, will not list the files therein
- Require Local or other
- #第三个设置的就是本地访问还是其他的ip的访问
Set up extranet access
After looking at the above configuration, you should be configured, and maybe after you Baidu
What Require all granted, what allow from all, but why not succeed?
The answer is really simple, that is, if you open the Vhosts module, your original
WWW (PS: It is said that the httpd.conf inside will fail), the reason is so simple, this is why you open the Vhosts module, and then configure a virtual host, and then localhost access, but can not access the reason, Knowing the reason for this is a simple solution.
Only use the WWW directory, then close the Vhosts module
Need to use the virtual host, then in the vhosts.conf to configure the external network access
See here you should be configured.
- #<virtualhost *:80>
- # documentroot "D:\soft\wamp\www"
- # ServerName 192.168.0.6
- # <directory "d:/soft/wamp/www/" >
- # Order Deny,allow
- # Allow from all
- # </Directory>
- #</virtualhost>
Just like that. If LAN access is required
Need require ******, specific self Baidu Bar
Apache local and LAN access settings