Toon posts:

[APACHE] Webserver probleem via WAN

Pagina: 1
Acties:

Verwijderd

Topicstarter
Een voor mij vreemd probleem.

Op SuSe draai ik Apache2.
Dit draai ik in een testomgeving. (op Wmware)

De webserver werkt prima als ik de webserver lokaal benader.
http://localhost:81

Ik krijg dan netjes de index.html, onder /srv/www/htdocs/

Echter als ik de pagina vanaf de WAN kant benader ontstaat er een
probleem:

=================================================
Access forbidden!

You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

If you think this is a server error, please contact the webmaster.
=================================================

Nu heeft iedereen lees rechten tot de map.
Port 81 staat naar buiten open op de fysieke router, en de VMware adapter bridged
naar mijn fysieke ethernet adapter.
Ook lijkt mij een probleem met NAT (of netwerk in zijn algemeenheid) niet aan de orde
daar Apache wel reageerd, echter niet zoals ik wil :)
Ik denk daarom dat het probleem OF in de Apache config zit, of Linux config zelf
maar ik kan maar niet achterhalen waar.

Ik kan maar 2 dingen bedenken:

1 Rechten issue
2 Een WAN verbinding mapped om 1 of andere vage (config?) reden (anders dan de loopback) niet naar /srv/www/htdocs maar naar een andere map? waar uiteraard geen index.html staat?

Anyone? :(

  • zomertje
  • Registratie: Januari 2000
  • Laatst online: 03-02 16:28

zomertje

Barisax knorretje

Voor de zekerheid, wat is bij jou 'leesrechten'?
Om door dirs te browsen moet in ieder geval ook de x (execute) aan staan :)

het ultieme jaargetijde.... | #!/usr/bin/girl | Art prints and fun


  • koffiedrinker
  • Registratie: September 2002
  • Laatst online: 05-02 21:05

koffiedrinker

Archlinux werkt dagelijks

Volgens mij staan je rechten onder Apache nog niet helemaal goed. Kijk eens goed naar het <Directory> directive. De documentatie kan je hier wel vinden.

Koffie werkt echt!


Verwijderd

Topicstarter
Ik kom er niet uit.
het moet iets heel stoms zijn, dat kan niet anders. :P


zie ook de error_log:

[client 62.***.***.***] Directory index forbidden by rule: /srv/www/htdocs

Het ip adres is voorzien van sterretje door mijzelf.. (staat niet zo in de log) :)
maarre.....forbidden by WHAT RULE... (AAARGHHH) <== 8)7

-ahum-

help?

Verwijderd

1) Had je al naar de opmerkingen van zomertje en koffiedrinker gekeken?
2) Mogen we alsjeblieft je configuratie zien? "Het werkt niet" zonder de bijbehorende configuratie kunnen we helemaal niets mee.

Verwijderd

Topicstarter
Ja dat is het juist r3boot......ik weet nu niet welke configuratie er precies toe doet m.b.t. dit probleem.
Ik heb naar de directives gekeken. Dat is echter redelijk complex en kan ik niet
een oorzaak in vinden als ik naar de documentatie kijk op de Apache website.
Ik draai apache2 dus er is niet 1 configuratie file.
heb gekeken in de default-server.conf omdat ik daar de "configure the documentroot" zie staan en ik het idee dat dit configuratie bestand de boosdoener is (?)

Ik heb naast leesrechten nu ook "executable" rechten gegeven.
Weet alleen niet waarom dit zou moeten, HTML is toch geen programma?
Het werkt iig nog niet..... :P

zie ook onderstaande: (default-config.conf)
========================================================
#
# Global configuration that will be applicable for all virtual hosts, unless
# deleted here, or overriden elswhere.
#


DocumentRoot "/srv/www/htdocs"

#
# Configure the DocumentRoot
#
<Directory "/srv/www/htdocs">
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.

Options all
# Options None <== originele waarde.

# AllowOverride controls what directives may be placed in .htaccess files.

# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
AllowOverride None
# Controls who can get stuff from this server.
Order allow,deny
Allow from all
</Directory>

# Aliases: aliases can be added as needed (with no limit). The format is
# Alias fakename realname
#
# Note that if you include a trailing / on fakename then the server will
# require it to be present in the URL. So "/icons" isn't aliased in this
# example, only "/icons/". If the fakename is slash-terminated, then the
# realname must also be slash terminated, and if the fakename omits the
# trailing slash, the realname must also omit it.
#
# We include the /icons/ alias for FancyIndexed directory listings. If you
# do not use FancyIndexing, you may comment this out.
#
Alias /icons/ "/usr/share/apache2/icons/"

<Directory "/usr/share/apache2/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"

# "/srv/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/srv/www/cgi-bin">
AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from all
</Directory>


# Include all *.conf files from /etc/apache2/conf.d/.
#
# This is mostly meant as a place for other RPM packages to drop in their
# configuration snippet.
# You can comment this out here if you want those bits include only in a
# certain virtual host, but not here.
#
Include /etc/apache2/conf.d/*.conf

# The manual... if it is installed ('?' means it won't complain)
Include /etc/apache2/conf.d/apache2-manual?conf
ServerName vm01sw
ServerAdmin lennart@******.nl
NameVirtualHost 192.168.2.143
========================================================

Hopelijk is dit wat.
Bedankt tot nu toe!

[ Voor 8% gewijzigd door Verwijderd op 31-01-2006 20:37 ]


  • ge-flopt
  • Registratie: Februari 2001
  • Laatst online: 14:45
Heb je die executable rechten ook op een directory gezet? De combinatie die er staat (log file en error) lijken erop dat de user die apache aanstuurt niet in die dir mogen komen.

Test dat eens met "su - <apache account>" en kijk dan eens of je in alle directories kunt komen. Met su - (let op die - ) wordt je het acocunt met alle rechten en variablen opnieuw geladen voor dat account.
Pagina: 1