Interdit apparaît dans Apache+Tomcat
黄舟
黄舟 2017-05-16 17:03:00
0
2
521

Définissez wap.luger.me dans Apache pour qu'il pointe vers le projet wap dans Tomcat. Interdit apparaît lors de la visite

Vous n'avez pas la permission d'accéder à / sur ce serveur.

Ce n'est pas un problème d'autorisations. Tomcat est démarré en tant qu'utilisateur Luger et Apache est démarré en tant qu'utilisateur root. S'il vous plaît dites-moi comment résoudre ce problème. Merci.

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

répondre à tous(2)
Peter_Zhu

Je viens de rencontrer ce problème. Il y a plusieurs raisons à ce problème. La solution à ce problème dépend de votre version d'Apache. La solution est également différente si vous l'avez installée récemment, la version d'Apache devrait être 2.4. Il configure le répertoire virtuel différemment de 2.2.
Veuillez lire attentivement cet article : http://linux.cn/article-3164-1.html
Ceci est défini dans le répertoire par défaut d'Apache. Si le répertoire virtuel n'est pas intégré dans /var/www, alors il doit être défini comme suit :

ServerName 127.0.0.1:80
<Directory /home/hehongwei/wwwroot/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>
<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
        ServerName unixmen1.local
        ServerAlias www.unixmen1.local
        ServerAdmin webmaster@localhost
        DocumentRoot /home/hehongwei/wwwroot


        # 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>
给我你的怀抱

Vous n'avez pas la permission d'accéder à / sur ce serveur.

Aucune autorisation pour accéder au répertoire racine

Il se peut que le fichier de configuration ait été mal écrit. Est-il écrit comme ceci ? Directory "/"

Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!