staging.inyokaproject.org

Apache2 mod_rewrite für virtuellem host nicht aktivierbar?!

Status: Ungelöst | Ubuntu-Version: Ubuntu 16.04 (Xenial Xerus)
Antworten |

Dirk_Lehmann_Ubuntu

Avatar von Dirk_Lehmann_Ubuntu

Anmeldungsdatum:
10. März 2016

Beiträge: 95

Hallo,

ich bräuchte für eine PHP-Anwendung u.A. das Modul rewrite bzw. mod_rewrite aktiviert (für einen virtuellen host).

Dazu habe ich die .conf -Datei für den host wie folgt aufgebaut:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<IfModule mod_fastcgi.c>
  AddHandler php56-fcgi-www .php
  Action php56-fcgi-www /php56-fcgi-www
  Alias /php56-fcgi-www /usr/lib/cgi-bin/php56-fcgi-www
  FastCgiExternalServer /usr/lib/cgi-bin/php56-fcgi-www -socket /run/php/php5.6$

  <Directory "/usr/lib/cgi-bin">
     Require all granted
  </Directory>
</IfModule>

<IfModule mod_fastcgi.c>
   AddHandler php70-fcgi-www .php
   Action php70-fcgi-www /php70-fcgi-www
   Alias /php70-fcgi-www /usr/lib/cgi-bin/php70-fcgi-www
   FastCgiExternalServer /usr/lib/cgi-bin/php70-fcgi-www -socket /run/php/php7.$

   <Directory "/usr/lib/cgi-bin">
      Require all granted
   </Directory>
</IfModule>

<IfModule mod_fastcgi.c>
   <FilesMatch ".+\.ph(p[345]?|t|tml)$">
      SetHandler php70-fcgi-www
   </FilesMatch>
</IfModule>

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port t$
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        ServerName shop.so-geht-es.org
        ServerAdmin dirk.lehmann@so-geht-es.org
        DocumentRoot /var/www/shopware
        <Directory /var/www/shopware>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>
        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/errors-shop-so-geht-es.log
        CustomLog ${APACHE_LOG_DIR}/access-shop-so-geht-es.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

Und mit sudo a2enmod rewrite das Modul aktiviert. Erneutes ausführen des Befehls schreibt, dass das Modul schon aktiviert sei.

Auch die Ausgabe von apache2ctl -M zeigt das Modul an:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Loaded Modules:
 core_module (static)
 so_module (static)
 watchdog_module (static)
 http_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 unixd_module (static)
 access_compat_module (shared)
 actions_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_core_module (shared)
 authn_file_module (shared)
 authz_core_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 fastcgi_module (shared)
 filter_module (shared)
 mime_module (shared)
 mpm_prefork_module (shared)
 negotiation_module (shared)
 php7_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 socache_shmcb_module (shared)
 ssl_module (shared)
 status_module (shared)

Leider zweigt die PHP-Anwendung bisher immer noch bei der Installation, dass mod_rewrite aktiviert werden sollte und lässt sich nicht erfolgreich installieren.

Wie kann ich das beheben? Wie müsste ich mein Ubuntu 16.04.4 LTS (GNU/Linux 4.4.0-87-generic x86_64) so konfigurieren, dass sich die Shopware Community Edition einwandfrei installieren lässt?

Übrigens verwende ich PHP 7 für den host, nach der Anleitung von Thomas Christlieb (im Web) habe ich zwei PHP-Interpreter bzw. Postprozessoren in Verwendung.

Für entsprechende Tips und Ratschläge danke ich im Voraus. Gerne schreibe ich hier zurück, was der Tip gebracht hat oder eben eventuell auch nicht.

encbladexp Team-Icon

Ehemaliger
Avatar von encbladexp

Anmeldungsdatum:
16. Februar 2007

Beiträge: 17531

Warum die beiden PHP Versionen? Warum FastCGI und nicht einfach mod_php wenn da nur eine Anwendung drauf läuft? Dazu kommt das mod_rewrite zwar wohl aktiv ist, aber halt auch konfiguriert werden muss.

mfg Stefan

Antworten |