如何更改默认页面localhost debian以运行应用程序 [英] how to change the Default page localhost debian to run an application
问题描述
在debian中,我安装了一个应用程序 maarchrm。在指南安装末尾,需要将行127.0.0.1添加到文件 etc / hosts中。
在此文件中,我们找到以下行:
In debian, I installed an application 'maarchrm'. at the end of the guide intallation it's demanded to add the line 127.0.0.1 to the file 'etc/hosts'. inside this file we find these lines :
127.0.0.1 localhost debian
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
所以当我添加行时,它变成这样:
So when I add the line, It becomes like this :
127.0.0.1 maarchrm
127.0.0.1 localhost debian
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
当我想使用地址' http://运行该应用程序时,会出现问题maarchrm 。它需要我进入 apache2 debian默认页面
,这里是000默认值:
the problem occurs when I want to run this application using the address 'http://maarchrm'. it takes me to 'apache2 debian default page' here is the 000-default :
#<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 webmaster@localhost
#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>
Include /var/www/laabs/data/maarchRM/conf/vhost.conf
我该如何解决这个问题,并提前感谢
how can I solve this and thanks in advance
推荐答案
注释000-default.conf中的每一行< ; virtualhost *:80>
。
Comment every line in 000-default.conf <virtualhost *:80>
aswell. Something like this.
#<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 webmaster@localhost
#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
# Application Maarch RM
#</VirtualHost>
Include /var/www/laabs/data/maarchRM/conf/vhost.conf
然后重新启动apache。这应该可以解决
Then restart apache. This should solve it
删除索引。 / var / www / html /中的html并以root身份运行以下命令:
Remove the index.html located in /var/www/html/ and run the following commands as root:
find /var/www/laabs/web/ -type f -print0 | sudo xargs -0 chmod 644
find /var/www/laabs/web/ -type d -print0 | sudo xargs -0 chmod 755
这篇关于如何更改默认页面localhost debian以运行应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!