m.marz
Goto Top

Apache lässt für andere Clients den Zugriff nicht zu

Hallo zusammen,

ich habe moodle auf ubuntu 14.04 lts auf einem apache2 installiert und soweit konfiguriert das die seite aufrufbar ist und funktioniert.
Allerdings nur Lokal.

Wenn ich nun auf einem anderen Client im Browser IPvonUbuntu/moodle eintippe, kommt diese Meldung im Bild.

ff114ef8119d86d7db5e797c1b2809bb


Für mich sieht es so aus, als würde die Firewall oder der Apache den Zugriff von außen nicht gestatten.

Was und wie kann ich es einstellen das der Zugriff gestattet wird.

Das ganze soll nur im Intranet laufen.


Hoffe auf eure tolle Hilfe.

Lg

M.Marz

Content-Key: 297470

Url: https://administrator.de/contentid/297470

Ausgedruckt am: 19.03.2024 um 06:03 Uhr

Mitglied: Sheogorath
Lösung Sheogorath 26.02.2016 aktualisiert um 13:47:36 Uhr
Goto Top
Moin,

das ist kein Problem von Apache, sondern ein Moodleproblem.

Wäre Apache nicht erreichbar würdest du einen Fehler von deinem Browser erhalten, hier ist es offensichtlich eine Fehlerseite die durch den Webserver generiert wurde.

(Ich kenne Moodle zwar nur aus der Benutzersicht) aber es nutzt wohl eine sogenannte "baseurl" also eine url über die alle Anfrage verarbeitet werden und über die unter anderem gewisse Links generiert werden. Diese wird beim einrichten festgelegt. Hierbei kann dies automatisch oder händisch geschehen (je nach System, weiß ich bei Moodle nicht). Da du die Seite unter 127.0.0.1 eingerichtet hast, wurde http://127.0.0.1/moodle zur baseurl was für externe Clients natürlich suboptimal ist.

Mehr Infos dazu: https://docs.moodle.org/30/en/Administration_FAQ#How_can_I_change_the_do ...

In jedem Fall viel Spaß beim Lösen :D

Gruß
Chris
Mitglied: michi1983
Lösung michi1983 26.02.2016 aktualisiert um 13:47:34 Uhr
Goto Top
Hi @M.Marz,

poste doch bitte mal die Ausgabe von
cat /etc/apache2/apache2.conf

Gruß
Mitglied: 126919
Lösung 126919 26.02.2016 aktualisiert um 13:47:33 Uhr
Goto Top
Einfach in der Moodle Config (/var/www/html/moodle/config.php) die IP oder Hostname anpassen mit der im Netz auf den Server zugegriffen wird:
https://docs.moodle.org/30/en/Step-by-step_Installation_Guide_for_Ubuntu ...

fk
Mitglied: 119944
Lösung 119944 26.02.2016 aktualisiert um 13:47:18 Uhr
Goto Top
Moin,

bin genau wie Sheogorath der Meinung, dass es sich hierbei nicht um ein Apache Problem sondern um ein Problem deiner Applikation handelt. Fehlermeldungen im Apache sehen anders aus.

Zu Moodle kann ich leider nichts beitragen.

VG
Val
Mitglied: M.Marz
M.Marz 26.02.2016 um 13:16:44 Uhr
Goto Top
  1. This is the main Apache server configuration file. It contains the
  2. configuration directives that give the server its instructions.
  3. See http://httpd.apache.org/docs/2.4/ for detailed information about
  4. the directives and /usr/share/doc/apache2/README.Debian about Debian specific
  5. hints.
#
#
  1. Summary of how the Apache 2 configuration works in Debian:
  2. The Apache 2 web server configuration in Debian is quite different to
  3. upstream's suggested way to configure the web server. This is because Debian's
  4. default Apache2 installation attempts to make adding and removing modules,
  5. virtual hosts, and extra configuration directives as flexible as possible, in
  6. order to make automating the changes and administering the server as easy as
  7. possible.

  1. It is split into several files forming the configuration hierarchy outlined
  2. below, all located in the /etc/apache2/ directory:
#
  • `-- sites-enabled
  • #
    #
    1. * apache2.conf is the main configuration file (this file). It puts the pieces
    2. together by including all remaining configuration files when starting up the
    3. web server.
    #
    1. * ports.conf is always included from the main configuration file. It is
    2. supposed to determine listening ports for incoming connections which can be
    3. customized anytime.
    #
    1. * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
    2. directories contain particular configuration snippets which manage modules,
    3. global configuration fragments, or virtual host configurations,
    4. respectively.
    #
    1. They are activated by symlinking available configuration files from their
    2. respective *-available/ counterparts. These should be managed by using our
    3. helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See
    4. their respective man pages for detailed information.
    #
    1. * The binary is called apache2. Due to the use of environment variables, in
    2. the default configuration, apache2 needs to be started/stopped with
    3. /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
    4. work with the default configuration.


    1. Global configuration
    #

    #
    1. ServerRoot: The top of the directory tree under which the server's
    2. configuration, error, and log files are kept.
    #
    1. NOTE! If you intend to place this on an NFS (or otherwise network)
    2. mounted filesystem then please read the Mutex documentation (available
    3. at <URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex>);
    4. you will save yourself a lot of trouble.
    #
    1. Do NOT add a slash at the end of the directory path.
    #
    #ServerRoot "/etc/apache2"

    #
    1. The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
    #
    Mutex file:${APACHE_LOCK_DIR} default

    #
    1. PidFile: The file in which the server should record its process
    2. identification number when it starts.
    3. This needs to be set in /etc/apache2/envvars
    #
    PidFile ${APACHE_PID_FILE}

    #
    1. Timeout: The number of seconds before receives and sends time out.
    #
    Timeout 300

    #
    1. KeepAlive: Whether or not to allow persistent connections (more than
    2. one request per connection). Set to "Off" to deactivate.
    #
    KeepAlive On

    #
    1. MaxKeepAliveRequests: The maximum number of requests to allow
    2. during a persistent connection. Set to 0 to allow an unlimited amount.
    3. We recommend you leave this number high, for maximum performance.
    #
    MaxKeepAliveRequests 100

    #
    1. KeepAliveTimeout: Number of seconds to wait for the next request from the
    2. same client on the same connection.
    #
    KeepAliveTimeout 5


    1. These need to be set in /etc/apache2/envvars
    User ${APACHE_RUN_USER}
    Group ${APACHE_RUN_GROUP}

    #
    1. HostnameLookups: Log the names of clients or just their IP addresses
    2. e.g., www.apache.org (on) or 204.62.129.132 (off).
    3. The default is off because it'd be overall better for the net if people
    4. had to knowingly turn this feature on, since enabling it means that
    5. each client request will result in AT LEAST one lookup request to the
    6. nameserver.
    #
    HostnameLookups Off

    1. ErrorLog: The location of the error log file.
    2. If you do not specify an ErrorLog directive within a <VirtualHost>
    3. container, error messages relating to that virtual host will be
    4. logged here. If you *do* define an error logfile for a <VirtualHost>
    5. container, that host's errors will be logged there and not here.
    #
    ErrorLog ${APACHE_LOG_DIR}/error.log

    #
    1. LogLevel: Control the severity of messages logged to the error_log.
    2. Available values: trace8, ..., trace1, debug, info, notice, warn,
    3. error, crit, alert, emerg.
    4. It is also possible to configure the log level for particular modules, e.g.
    5. "LogLevel info ssl:warn"
    #
    LogLevel warn

    1. Include module configuration:
    IncludeOptional mods-enabled/*.load
    IncludeOptional mods-enabled/*.conf

    1. Include list of ports to listen on
    Include ports.conf


    1. Sets the default security model of the Apache2 HTTPD server. It does
    2. not allow access to the root filesystem outside of /usr/share and /var/www.
    3. The former is used by web applications packaged in Debian,
    4. the latter may be used for local directories served by the web server. If
    5. your system is serving content from a sub-directory in /srv you must allow
    6. access here, or in any related virtual host.
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    Require all denied
    </Directory>

    <Directory /usr/share>
    AllowOverride None
    Require all granted
    </Directory>

    <Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
    </Directory>

    #<Directory /srv/>
    #</Directory>


    1. AccessFileName: The name of the file to look for in each directory
    2. for additional configuration directives. See also the AllowOverride
    3. directive.
    #
    AccessFileName .htaccess

    #
    1. The following lines prevent .htaccess and .htpasswd files from being
    2. viewed by Web clients.
    #
    <FilesMatch "^\.ht">
    Require all denied
    </FilesMatch>


    #
    1. The following directives define some format nicknames for use with
    2. a CustomLog directive.
    #
    1. These deviate from the Common Log Format definitions in that they use %O
    2. (the actual bytes sent including headers) instead of %b (the size of the
    3. requested file), because the latter makes it impossible to detect partial
    4. requests.
    #
    1. Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
    2. Use mod_remoteip instead.
    #
    LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
    LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %O" common
    LogFormat "%{Referer}i -> %U" referer
    LogFormat "%{User-agent}i" agent

    1. Include of directories ignores editors' and dpkg's backup files,
    2. see README.Debian for details.

    1. Include generic snippets of statements
    IncludeOptional conf-enabled/*.conf

    1. Include the virtual host configurations:
    IncludeOptional sites-enabled/*.conf

    1. vim: syntax=apache ts=4 sw=4 sts=4 sr noet
    Mitglied: 126919
    Lösung 126919 26.02.2016 aktualisiert um 13:47:11 Uhr
    Goto Top
    Die Apache Config musst du nicht anpassen, nur die Moodle Config weil die Meldung von Moodle und nicht vom Apache, kommt s.o.
    Mitglied: M.Marz
    M.Marz 26.02.2016 um 13:20:27 Uhr
    Goto Top
    auf welcher ip muss ich das den setzen. momentan läuft es noch auf über einen dhcp server.
    würde da der hostname auch einfach klappen? ich nehme mal an ja oder?

    lg.
    Mitglied: 126919
    Lösung 126919 26.02.2016 aktualisiert um 13:47:09 Uhr
    Goto Top
    Zitat von @M.Marz:

    auf welcher ip muss ich das den setzen. momentan läuft es noch auf über einen dhcp server.
    Dann entweder einen festen MAC-Eintrag auf dem DHCP setzen und die IP festpinnen oder einen DNS-Server nutzen.
    würde da der hostname auch einfach klappen? ich nehme mal an ja oder?
    Wenn du einen DNS-Server hast, oder du in der IF-Config des Ubuntu den internen Domain-Name richtig gesetzt hast dann ja.

    Echt jetzt ??? Das sind einfachste Netzwerkgrundlagen die man beherrschen sollte wenn man an Linux Systemen schraubt!
    Mitglied: michi1983
    Lösung michi1983 26.02.2016 aktualisiert um 13:35:17 Uhr
    Goto Top
    Scheint offenbar wirklich ein Problem von Moodle selbst zu sein.
    https://moodle.org/mod/forum/discuss.php?d=168703
    Hier wird aber auch erklärt wo du an der config schrauben musst, damit es dann wie gewünscht funktioniert.

    Es gab auch den Hinweis, dass man Moodle manuell installieren soll nachdem man apache2, php5 and MySQL installiert hat.
    Mit der apt-get install moodle Variante scheint es öfter komplizierter zu werden als man wünscht.

    Gruß
    Mitglied: M.Marz
    M.Marz 26.02.2016 um 13:29:31 Uhr
    Goto Top
    super leute ich danke euch alle für eure Hilfe