2017-12-20 3 views
-2

Ich habe einen Ubuntu 16-Server als VM auf meinem PC ausgeführt. Ich habe bereits eine Reihe von Websites, die ohne Probleme laufen. Die Standard-Apache-Website ist in Ordnung. Ich habe ein Produkt namens otrs (http://www.otrs.com) installiert und keine Fehler festgestellt. Wenn ich jedoch versuche, die Website zu durchsuchen, erhalte ich eine 404.Apache-Website nicht verfügbar

Ich kann die Site über Apache (a2ensite und a2dissite) aktivieren und deaktivieren, ohne dass Fehler gemeldet werden. Es gibt keine Fehler in den Apache-Protokolldateien. Ich bin etwas verloren, um zu wissen, was ich als nächstes tun soll. Irgendwelche Vorschläge dankbar erhalten.

Einige Dinge habe ich ausprobiert. Wenn ich laufen:

sudo ls -ll /etc/apache2/sites-available/;ls -ll /etc/apache2/sites-enabled/;cat /etc/apache2/sites-enabled/*.conf;a2query -s 

ich folgendes:

total 12 
-rw-r--r-- 1 root root 1332 Mar 19 2016 000-default.conf 
-rw-r--r-- 1 root root 6338 Apr 5 2016 default-ssl.conf 
lrwxrwxrwx 1 root root 44 Dec 20 07:16 otrs.conf -> /opt/otrs/scripts/apache2-httpd.include.conf 
total 0 
lrwxrwxrwx 1 root root 35 Nov 8 04:24 000-default.conf -> ../sites-available/000-default.conf 
lrwxrwxrwx 1 root root 28 Dec 20 08:00 otrs.conf -> ../sites-available/otrs.conf 
<VirtualHost *:80> 
     # The ServerName directive sets the request scheme, hostname and port that 
     # 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 www.example.com 

     ServerAdmin [email protected] 
     DocumentRoot /var/www/html 

     # 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}/error.log 
     CustomLog ${APACHE_LOG_DIR}/access.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> 

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet 
# -- 
# added for OTRS (http://otrs.org/) 
# -- 

ScriptAlias /otrs/ "/opt/otrs/bin/cgi-bin/" 
Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/" 

<IfModule mod_perl.c> 

    # Setup environment and preload modules 
    Perlrequire /opt/otrs/scripts/apache2-perl-startup.pl 

    # Reload Perl modules when changed on disk 
    PerlModule Apache2::Reload 
    PerlInitHandler Apache2::Reload 

    # general mod_perl2 options 
    <Location /otrs> 
#  ErrorDocument 403 /otrs/customer.pl 
     ErrorDocument 403 /otrs/index.pl 
     SetHandler perl-script 
     PerlResponseHandler ModPerl::Registry 
     Options +ExecCGI 
     PerlOptions +ParseHeaders 
     PerlOptions +SetupEnv 

     <IfModule mod_version.c> 
      <IfVersion < 2.4> 
       Order allow,deny 
       Allow from all 
      </IfVersion> 
      <IfVersion >= 2.4> 
       Require all granted 
      </IfVersion> 
     </IfModule> 
     <IfModule !mod_version.c> 
      Order allow,deny 
      Allow from all 
     </IfModule> 
    </Location> 

    # mod_perl2 options for GenericInterface 
    <Location /otrs/nph-genericinterface.pl> 
     PerlOptions -ParseHeaders 
    </Location> 

</IfModule> 

<Directory "/opt/otrs/bin/cgi-bin/"> 
    AllowOverride None 
    Options +ExecCGI -Includes 

    <IfModule mod_version.c> 
     <IfVersion < 2.4> 
      Order allow,deny 
      Allow from all 
     </IfVersion> 
     <IfVersion >= 2.4> 
      Require all granted 
     </IfVersion> 
    </IfModule> 
    <IfModule !mod_version.c> 
     Order allow,deny 
     Allow from all 
    </IfModule> 

    <IfModule mod_filter.c> 
     <IfModule mod_deflate.c> 
      AddOutputFilterByType DEFLATE text/html text/javascript application/javascript text/css text/xml application/json text/json 
     </IfModule> 
    </IfModule> 

</Directory> 

<Directory "/opt/otrs/var/httpd/htdocs/"> 
    AllowOverride None 

    <IfModule mod_version.c> 
     <IfVersion < 2.4> 
      Order allow,deny 
      Allow from all 
     </IfVersion> 
     <IfVersion >= 2.4> 
      Require all granted 
     </IfVersion> 
    </IfModule> 
    <IfModule !mod_version.c> 
     Order allow,deny 
     Allow from all 
    </IfModule> 

    <IfModule mod_filter.c> 
     <IfModule mod_deflate.c> 
      AddOutputFilterByType DEFLATE text/html text/javascript application/javascript text/css text/xml application/json text/json 
     </IfModule> 
    </IfModule> 

    # Make sure CSS and JS files are read as UTF8 by the browsers. 
    AddCharset UTF-8 .css 
    AddCharset UTF-8 .js 

    # Set explicit mime type for woff fonts since it is relatively new and apache may not know about it. 
    AddType application/font-woff .woff 

</Directory> 

# Allow access to public interface for unauthenticated requests on systems with set-up authentication. 
# Will work only for RegistrationUpdate, since page resources are still not be loaded. 
# <Location /otrs/public.pl> 
#  <IfModule mod_version.c> 
#   <IfVersion < 2.4> 
#    Order allow,deny 
#    Allow from all 
#   </IfVersion> 
#   <IfVersion >= 2.4> 
#    Require all granted 
#   </IfVersion> 
#  </IfModule> 
#  <IfModule !mod_version.c> 
#   Order allow,deny 
#   Allow from all 
#  </IfModule> 
# </Location> 

<IfModule mod_headers.c> 
    # Cache css-cache for 30 days 
    <Directory "/opt/otrs/var/httpd/htdocs/skins/*/*/css-cache"> 
     <FilesMatch "\.(css|CSS)$"> 
      Header set Cache-Control "max-age=2592000 must-revalidate" 
     </FilesMatch> 
    </Directory> 

    # Cache css thirdparty for 4 hours, including icon fonts 
    <Directory "/opt/otrs/var/httpd/htdocs/skins/*/*/css/thirdparty"> 
     <FilesMatch "\.(css|CSS|woff|svg)$"> 
      Header set Cache-Control "max-age=14400 must-revalidate" 
     </FilesMatch> 
    </Directory> 

    # Cache js-cache for 30 days 
    <Directory "/opt/otrs/var/httpd/htdocs/js/js-cache"> 
     <FilesMatch "\.(js|JS)$"> 
      Header set Cache-Control "max-age=2592000 must-revalidate" 
     </FilesMatch> 
    </Directory> 

    # Cache js thirdparty for 4 hours 
    <Directory "/opt/otrs/var/httpd/htdocs/js/thirdparty/"> 
     <FilesMatch "\.(js|JS)$"> 
      Header set Cache-Control "max-age=14400 must-revalidate" 
     </FilesMatch> 
    </Directory> 
</IfModule> 

# Limit the number of requests per child to avoid excessive memory usage 
MaxRequestsPerChild 4000 
otrs (enabled by site administrator) 
000-default (enabled by site administrator) 

, die alle um

+0

Falsche Website, versuchen Sie auf https://askubuntu.com/ oder https://unix.stackexchange.com/. SO ist für Programmierfragen. – Nic3500

Antwort