set up fast apache

Dear all,
I would like to set-up a pretty fast a running apache. I would like to use him so to launch a pretty small web site of 10 static html pages. At this time there is no security concerns (even though I want to do it right) , because the computer has not even ethernet cable.

I have some experience, 8 years ago I Was setting up virtual hosts in fedora, so this process is not a blackbox for me.

Thank you very much for your help

Best Regards
Alex

If you are serving static pages and want it to be fast, I would recommend using nginx server. I had written a guide about it earlier, will find the link and provide the link in here in a sec.

Here is the link: Nginx server with PHP

You can disregard the parts related to cgi and php, since you will be using it just for static pages.

On 05/22/2011 07:06 PM, alaios wrote:
>
> because the computer has not even ethernet cable.

if the computer is not connected to any network, then you just want to
look at these ten static pages on your machine, and from your
machine…right?

if so you do not need Apache…just open your browser and in the menu
click File > Open File…navigate to the directory where your ten pages
are and pick one to click on…

and if internal links in the pages are correctly formed you can zing
from one page to the others…


dd CAVEAT: http://is.gd/bpoMD
[NNTP via openSUSE 11.4 [2.6.37.6-0.5] + KDE 4.6.0 + Thunderbird 3.1.10]
Dual booting with Sluggish Loser7 on Acer Aspire One D255

This might be worth a read – there are some recipes there that work in openSUSE; e.g. those recipes run my websites OK: HowTo: Configure a Linux Apache Web Server on Suse/openSUSE

Thanks a lot now apache2 works fine!

I also wanted to add authentication and make my web server accessible only through specific ip addresses
thus I changed Directory directive to:

<Directory /srv/www>
AllowOverride AuthConfig
AuthName “Add your login message here.”
AuthType Basic
AuthUserFile /srv/testfolder/.htpasswd
AuthGroupFile /dev/null
require user testaccess
Order Deny,Allow
Deny from all
Allow from 200.200.200
</Directory>

but even thou my ip does not start from 200.200.200 I can get access… what might be the problem?

Best Regards
Alex

I’ve never addressed that kind of access. Will watch with interest.

alaios wrote:
> thus I changed Directory directive to:
>
> <Directory /srv/www>
> AllowOverride AuthConfig
> AuthName “Add your login message here.”
> AuthType Basic
> AuthUserFile /srv/testfolder/.htpasswd
> AuthGroupFile /dev/null
> require user testaccess
> Order Deny,Allow
> Deny from all
> Allow from 200.200.200
> </Directory>
>
> but even thou my ip does not start from 200.200.200 I can get access…
> what might be the problem?

Do you have any other Allow, Deny or Order directives in this or any
other config file? For subdirectories or in .htaccess files?

Is there a Satisfy directive anywhere?

Is there anything in the logs?

Dave Howorth wrote:

>> <Directory /srv/www>
Normaly this should be <Directory “/srv/www”>, I do not know if the “” make
a difference here. But I have never seen it without the quotes.


PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.3 | GeForce
9600 GT | 4GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.0 | nVidia
ION | 3GB Ram

alaios wrote:
> I also wanted to add authentication and make my web server accessible
> only through specific ip addresses
> thus I changed Directory directive to:
>
> <Directory /srv/www>
One additional thought: In which file did you change this?
http.conf or default-server.conf?
The first one includes the second one and default-server.conf contains a
directory directive for <Directory “/srv/www/htdocs”> which by default
allows access for all and may override your setting if it is in the wrong
place.
But I am not a web server expert, just a random thought. I looked this up in
my local “family” webserver.


PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.3 | GeForce
9600 GT | 4GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.0 | nVidia
ION | 3GB Ram

Just to confirm, I tested this now that changing the directive in
/etc/apache2/default-server.conf to


<Directory "/srv/www/htdocs">
Options None
AllowOverride None
Order allow,deny
Deny from all
Allow from 200.200.200

#Allow from all
</Directory>

and restrating apache2 does what is expected -> Access denied from my
machine which has 192.x.x.x.


PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.3 | GeForce
9600 GT | 4GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.0 | nVidia
ION | 3GB Ram

martin_helm wrote:
> Order allow,deny
sorry that has of course to be “Order deny, allow” and I double checked with
a partial address of 192.168.178 access works and with 193.168.178 (which
does not correspond to any machine here) always access denied.
So default-server.conf is the right place.


PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.3 | GeForce
9600 GT | 4GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.0 | nVidia
ION | 3GB Ram