This is a discussion on Disable public access within the Apache Web Server forums, part of the Web Server and Related Forums category; I have setup an Apache using default httpd.conf, however, I only want to access the server via localhost, so ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I have setup an Apache using default httpd.conf, however, I only want
to access the server via localhost, so I modified, <Directory /> AllowOverride None Order deny,allow Deny from all Satisfy all </Directory> <Directory "/var/www/html"> Options Indexes FollowSymLinks AllowOverride None Order Deny,Allow Deny from all Allow from 127.0.0.1 </Directory> However, I found that I still can access the server from Internet, any points I missed? Thanks. |
|
|||
|
"howa" <howachen@gmail.com> wrote in message
news:4c8b1d51-5bb9-435c-9c48-dea6ce2f486b@q10g2000prf.googlegroups.com... > I have setup an Apache using default httpd.conf, however, I only want > to access the server via localhost, so I modified, > > <Directory /> > AllowOverride None > Order deny,allow > Deny from all > Satisfy all > </Directory> > > <Directory "/var/www/html"> > Options Indexes FollowSymLinks > AllowOverride None > Order Deny,Allow > Deny from all > Allow from 127.0.0.1 > </Directory> > > However, I found that I still can access the server from Internet, any > points I missed? What you have done does not shut off access but instead causes pages to be served as "403" errors, except for 127.0.0.1. You need to use/modify the LISTEN directive if you don't want apache to respond to other addresses. Also, where's your firewall? Secondly: The "satisfy all" and second "order deny,allow" statements are not necessary based on this snippet. Satisfy might be needed if you have other resources defined. Also note that you're allowing only on the IPv4 localhost and not the IPv6 localhost. |
| Thread Tools | |
| Display Modes | |
|
|