Rumah > Soal Jawab > teks badan
Tetapkan wap.luger.me dalam apache untuk menunjuk ke projek wap dalam tomcat. Terlarang muncul ketika melawat
Anda tiada kebenaran untuk mengakses / pada pelayan ini.
Ini bukan isu kebenaran Tomcat dimulakan sebagai pengguna luger dan apache dimulakan sebagai pengguna root. Tolong beritahu saya bagaimana untuk menyelesaikan masalah ini. Terima kasih.
天蓬老师2017-05-16 17:05:00
Saya kebetulan menghadapi masalah ini Terdapat banyak sebab untuk masalah ini. Kaedah untuk menyelesaikan masalah ini bergantung pada versi apache anda. Ia mengkonfigurasi direktori maya secara berbeza daripada 2.2.
Sila baca artikel ini dengan teliti: http://linux.cn/article-3164-1.html
Ini ditetapkan dalam direktori lalai apache Jika direktori maya tidak dibina dalam /var/www, maka ia mesti ditetapkan seperti berikut:
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>
给我你的怀抱2017-05-16 17:05:00
Anda tiada kebenaran untuk mengakses / pada pelayan ini.
Tiada kebenaran untuk mengakses direktori root
Sepatutnya fail konfigurasi itu ditulis dengan tidak betul. Directory "/"