Maison  >  Questions et réponses  >  le corps du texte

Interdit apparaît dans Apache+Tomcat

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.

黄舟黄舟2713 Il y a quelques jours514

répondre à tous(2)je répondrai

  • 天蓬老师

    天蓬老师2017-05-16 17:05:00

    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>
    

    répondre
    0
  • 给我你的怀抱

    给我你的怀抱2017-05-16 17:05:00

    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 "/"

    répondre
    0
  • Annulerrépondre