My computer is running SUSE Linux Enterprise Server 11 (x86_64). I have set up an apache server there. The version is Apache/2.2.10 (Linux/SUSE) PHP/5.2.14 with Suhosin-Patch mod_python/3.3.1 Python/.
It works well. I can reach the server and visit the webpages from other computers. The problem is every computer can visit it. I just want to some people can reach my server by specifying the IP address, or computer name, or whatever else. Do you guy have any idea how I can do it?
I guess you know this is an openSUSE forums and that any answer here is most likely to be based on openSUSE and thus not have to be applicable to your SUSE Linux Enterprise Server?
To all the ppl who think the questioner might be better off elsewhere, this is a question about Apache servers. It would equally well be answered in the Linux Mint forums. Asking it here is just fine because it’s a Linux-wide question.
Thanks for your reminding. I will ask questions about SLES at the Novell forum in the future.
Hi Swerdna,
Thanks for your encouraging and your suggestions.
Actually, I use both openSUSE and SLES. I have openSUSE on my laptop and run the SLES on the server machine. But I am pretty new with SUSE, and even with linux. I just transferred from a windows system to linux two months ago.
Now continue my question.
I could not find the .htaccess file on my computer. So I made one at /srv/www/htdocs/.htaccess, and added the following two lines,
Order deny,allow
Deny from all
into it.
Then, I stopped and restarted the apache. But my laptop still can access the web pages.
My laptop and the server machine are both located under the domain of my university. Is this the reason why the access can not be blocked?
It is not that we ill discourage you to ask here, but we only want you to know which sort of experst are mainly here. It is up to you to decide where you ask.
In this case, as Swerdna pointed out, it is a pure Apache2 question and as such operating system independent.
That said, when you run Apache you should know something about how it canve configured. Thus Swerdna’s implication that you know about .htaccess files and where they can be created. Maybe yoy should read a little bit in the Apache docs. They are on the internet as Swerdna pointed you to one of the pages within http://httpd.apache.org/docs/ And when your apache server is running, they are on your own system at http://localhost/manual/
When you know more about configuring Apache you know that you can also configure these things centraly in* /etc/apache2/default-server.conf.* E.g. for the DocumentRoot:
<Directory "/srv/www/htdocs">
Order deny,allow
Deny from all
Allow from 10.0.0
Allow from localhost
</Directory>
Then all is blocked unless /srv/www/htdocs is not the Document Root or some other Directive overrides these lines.
Presumably you altered the file default-server.conf. Please post here the contents
and
Are you using a .conf file in vhost.d? If “yes” then please post here the contents.