Apache2 ubuntu default page как убрать
Перейти к содержимому

Apache2 ubuntu default page как убрать

  • автор:

Apache 2.4 открывает только Default page?

Apache 2.4 на debian 8, добавлен виртуальный хост, при его открытии по доменному имени на localhost открывается без проблем, при попытке открыть с внешнего ip по доменному имени открывается apache default page, в hosts внешний ip добавлен, права на папку /var/www/example.com выставлены на www-data, в чем может быть причина?

  • Вопрос задан более трёх лет назад
  • 1984 просмотра

Комментировать

Решения вопроса 1

Silver13

Silver13 @Silver13 Автор вопроса

Ищущий ответы

Решено так: конфиг /etc/apache2/sites-available/example.com.conf
первая строка VirtualHost *:80 —> VirtualHost example.com:80
далее очистка кэша в браузере и ОК

Ответ написан более трёх лет назад

Комментировать

Нравится Комментировать

Форум русскоязычного сообщества Ubuntu

Страница сгенерирована за 0.048 секунд. Запросов: 25.

  • Сайт
  • Об Ubuntu
  • Скачать Ubuntu
  • Семейство Ubuntu
  • Новости
  • Форум
  • Помощь
  • Правила
  • Документация
  • Пользовательская документация
  • Официальная документация
  • Семейство Ubuntu
  • Материалы для загрузки
  • Совместимость с оборудованием
  • RSS лента
  • Сообщество
  • Наши проекты
  • Местные сообщества
  • Перевод Ubuntu
  • Тестирование
  • RSS лента

© 2012 Ubuntu-ru — Русскоязычное сообщество Ubuntu Linux.
© 2012 Canonical Ltd. Ubuntu и Canonical являются зарегистрированными торговыми знаками Canonical Ltd.

Как удалить Apache2 из Ubuntu и Debian

Я делаю это:

Я делаю это:

Деинсталлировать веб-сервер Apache2 — не то же самое, что установить его. Нужно удалить и сам пакет, и зависимые пакеты, и их конфигурации. Здесь рассказывается, как удалить Apache2 вчистую из Ubuntu и Debian.

Если вы читаете эту заметку, то скорее всего вы столкнулись с необходимостью откатить из системы ставший ненужным апач. У меня, например, такая потребность возникла потому, что я поставил веб-сервер непосредственно при установке дебиана, а по умолчанию ставится именно апач. На самом же деле для работы мне он оказался не нужен, но удалить его стандартной командой sudo apt-get purge apache2 никак не получалось, и я при каждой перезагрузке виртуалки с проклятьями останавливал apache2, чтобы запустить нужный мне nginx.

Ничего вменяемого на просторах рунета я не нашел, поэтому решил перевести статью из забугорного блога, которая помогла мне избавиться от Apache. Вот ссылка на оригинал статьи, если вам удобнее читать по-английски.

Во-первых, необходимо остановить апач — пока он запущен, удалить его нельзя. Что я и сделал.

$ sudo service apache2 stop

Затем надо деинсталлировать апач и связанные с ним пакеты. При этом нужно использовать purge вместо remove. Первый вариант попытается удалить и зависимые пакеты, и созданные ими конфигурационные файлы. В дополнение используйте autoremove, чтобы удалить некоторые другие зависимости, утсановленные вместе с апачем, но не используемые никакими другими пакетами.

$ sudo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common
$ sudo apt-get autoremove

Наконец, надо проверить наличие конфигурационных файлов или мануалов, связанных с Apache2, но до сих пор не удаленных.

$ whereis apache2

Я в ответ получил такую строчку:

apache2: /etc/apache2

Это значит, что директория /etc/apache2 все еще существует. Но раз теперь эта директория (и содержащиеся в ней файлы) никем не используется, удалите ее вручную.

$ sudo rm -rf /etc/apache2

После этого я перезагрузил виртуалку и возрадовался, увидев, как загрузился по умолчанию ngnix.

Why am I getting the Apache2 Ubuntu Default Page instead of my own index.html page?

I have an Ubuntu 14.10 computer that is used for local website testing, it is not serving to the internet. On it, I have seven websites set up. However, when I access two of the seven, I get the Apache2 Ubuntu Default Page instead of my own index page. As far as I can tell, I set up all seven using the exact same process, so I don’t know what these two are missing. Also, in my Apache logs directory, I have two log files, error and access for each of the two misbehaving sites, but all of them are empty. When I restart the apache2 service, there are no errors. I have retraced my steps multiple times and I can not see any difference between the working sites and the non working sites. What options do I have for diagnosing this problem? Can I force more verbose error logs somehow? Is there another log somewhere that I can reference? Here is an example of a .conf file for one of the malfunctioning sites:

 ServerName www.local_example.com ServerAlias local_example.com ServerAdmin [email protected] DocumentRoot /var/www/Websites/example.com Options Indexes FollowSymLinks MultiViews # pcw AllowOverride None AllowOverride All Order allow,deny allow from all # This directive allows us to have apache2's default start page # in /apache2-default/, but still have / go to the right place # Commented out for Ubuntu #RedirectMatch ^/$ /apache2-default/ ErrorLog /home/example/Apache_Logs/local_example.com_error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /home/example/Apache_Logs/local_example.com_access.log combined ServerSignature On 

Questioner
asked Mar 31, 2015 at 7:39
Questioner Questioner
6,759 33 33 gold badges 107 107 silver badges 165 165 bronze badges

How did you create the virtual hosts? Did you create them by adding files to /etc/apache2/sites-available ? If so, did you enable them with sudo a2ensite ? Does the default apache error log file have anything in it? And do you have a ServerAlias or ServerName configured in your virtual host files? If you disable the default site sudo a2dissite 000-default (you can re-enable it with sudo a2ensite 000-default ), does it work? Also, it could be that you just forgot to restart apache?

Mar 31, 2015 at 7:44

@Dan, thank you for responding. I created the sites by adding them to sites-available . The default error log has nothing in it. I have defined ServerAlias in the hosts file. I disabled the 000-default site but that did not change anything. I restarted and reloaded apache many times.

Mar 31, 2015 at 8:52

When you disabled the default site and restarted apache, it was still showing the default index.html page, or was it showing one from a different virtual host? Can you post the content of one of the misbehaving vhost files? This might make things much easier for us to help.

Mar 31, 2015 at 9:40

@Dan, Thank you for respondng. When I made the change you suggested, as I mentioned, nothing changed, meaning that it showed the exact same default index page. I’ve added a .conf file to my question.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *