как изменить страницу по умолчанию localhost debian для запуска приложения

В Debian я установил приложение maarchrm. в конце установки гайда требуется добавить строку 127.0.0.1 в файл 'etc/hosts'. внутри этого файла мы находим следующие строки:

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

Итак, когда я добавляю строку, она становится такой:

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-по умолчанию:

#<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

как я могу это решить и спасибо заранее


person K. ossama    schedule 07.03.2018    source источник
comment
прокомментируйте эту строку 127.0.0.1 localhost debian и опубликуйте результат   -  person Diogo Jesus    schedule 07.03.2018
comment
Я пробовал это, но безрезультатно, я все равно перехожу на страницу по умолчанию.   -  person K. ossama    schedule 07.03.2018


Ответы (1)


Также прокомментируйте каждую строку в 000-default.conf <virtualhost *:80>. Что-то вроде этого.

#<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

Затем перезапустите апач. Это должно решить это


РЕДАКТИРОВАТЬ

Удалите index.html, расположенный в /var/www/html/, и выполните следующие команды от имени пользователя 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
person Diogo Jesus    schedule 07.03.2018
comment
Я пробовал, но, к сожалению, это не сработало. может есть еще какая хитрость. - person K. ossama; 07.03.2018
comment
Отредактируйте свой вопрос и опубликуйте фактический файл 000-default.conf со знаком # в каждой строке. Дело в том, что DocumentRoot /var/www/html вызывается где-то в конфигурации, поэтому вы видите страницу apache по умолчанию. - person Diogo Jesus; 07.03.2018
comment
только что отредактировал мой вопрос, попробуйте, пожалуйста, и сообщите о результате - person Diogo Jesus; 07.03.2018
comment
Извините, что не ответил, я только что переустановил приложение, и оно работает как по волшебству. все равно спасибо за ответы :) - person K. ossama; 07.03.2018