I have an apache running in CentOS which comes with two network cards, such that the web server can be access via intranet and internet:

For a particular folder "upload", i.e.:

how can I limit traffic only allow from 192.168.x.x network but deny from the internet?


You need some access control directives:

Order deny,allow
Deny from all
Allow from localhost
Allow from

You can put these in your <Directory /upload> configuration or in a file named .htaccess in your "upload" folder.

More information on: https://httpd.apache.org/docs/2.2/howto/access.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.