Автор Тема: Пошаговые инструкции - школьный сервер 5.0.1  (Прочитано 77925 раз)

Оффлайн Salomatin

  • Модератор
  • *****
  • Сообщений: 981
    • Пошаговые инструкции
    • Email

Цитировать
[root@inetserver2 /]# service httpd2 restart
Service httpd2 is not running.                                                                                                                                                                         [PASSED]
Checking configuration sanity for httpd2:  httpd2: Syntax error on line 147 of /etc/httpd2/conf/httpd2.conf: Syntax error on line 151 of /etc/httpd2/conf/sites-enabled/000-default.conf: Expected </Directory> but saw </VirtualHost>
                                                                                                                                                                                                       [FAILED]



Линия 147 файла /etc/httpd2/conf/httpd2.conf отправляет к файлам каталога  Include conf/sites-enabled/*.conf там в файле etc/httpd2/conf/sites-enabled/000-default.conf вы добавили строку
<Directory "/usr/share/doc/indexhtml/">  но не закрыли ее директивой  </Directory>
посмотрите ролик там видна в режиме остановки эта часть файла.
Вот апач и не может выполнит 151  стоку RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [R,L]
поэтому когда вы напрямую правите RewriteCond %{HTTPS} != on все работает как при первом запуске.

Инструкция написана для Школьного сервера 5.0, может вам просто его поставить? А лучше совсем свежую версию 6.0
Апач то вы запустите, но вы ведь netams  поднимать собрались. А там еще вопросики возникнут. По проверенному пути, по роликам, вы быстрее поставите все что вам нужно.

Либо приведите пример полного текста файлов. которые правите или архив всего каталога    /etc/httpd2 , который можно получить командой
tar -cvf - /etc/httpd2 | gzip -c > myhttpd2.tar.gz


Хочешь понять сам, объясни другому.
"Если уже все испробовал и ничего не помогает - почитай инструкцию"

Оффлайн Skull

  • Глобальный модератор
  • *****
  • Сообщений: 19 918
    • Домашняя страница
    • Email
ставил с образа school-4.1.0-server-i586-install-cd.iso потом подключил репозиторий самый первый, ftp.altlinux.org...
и сделал apt-get update, затем уже ставил нетамс apt-get update netams
1. Нужно подключать оба репозитория (i586/x86_64 и noarch). См. http://www.altlinux.org/Branches/p5
2. apt-get dist-upgrade
Андрей Черепанов (cas@)

Оффлайн Niksea

  • Начинающий
  • *
  • Сообщений: 10
спасибо за подробные ответы, конечно лучше поставлю 5 версию, странно что не заметил этого при скачивании, погуглив по слову "Школьный сервер" сразу попал на страницу загрузки, и оказалось она 4 версии... Пока не зашел далеко в настройках буду переставлять.

Оффлайн Skull

  • Глобальный модератор
  • *****
  • Сообщений: 19 918
    • Домашняя страница
    • Email
спасибо за подробные ответы, конечно лучше поставлю 5 версию, странно что не заметил этого при скачивании, погуглив по слову "Школьный сервер" сразу попал на страницу загрузки, и оказалось она 4 версии... Пока не зашел далеко в настройках буду переставлять.
В ближайший месяц-два появится Альт Линукс 6.0 Школьный Сервер.
Андрей Черепанов (cas@)

Оффлайн Niksea

  • Начинающий
  • *
  • Сообщений: 10
Skull
благодарю за информацию!
3 года админю сервера и рабочие станции на Ubuntu, и теперь хочу вплотную занятся изучением этого замечательного проекта. Удивило что у нас в России занимаются "своим" линуксом, тем более для системы образования.
В планах запустить на школьном сервере почтовый сервер на Postfix, прокси Squid статистику Netams, Free-sa.
Как себя кстати ведут десктопные системы на AltLinux в доменах? Возможно ли без проблем включить рабочую станцию Altlinux в домен w2k3?

Оффлайн sb

  • Модератор глобальный
  • *****
  • Сообщений: 8 999
Как себя кстати ведут десктопные системы на AltLinux в доменах? Возможно ли без проблем включить рабочую станцию Altlinux в домен w2k3?
А у вас был опыт включения других дистрибутивов в домен на базе оффтопика ? В альте ведь все те же инструменты (самба и т.п.)

Оффлайн Niksea

  • Начинающий
  • *
  • Сообщений: 10
не получалось ниразу, пробовал на Убунтах, но очень сложно....

Оффлайн sb

  • Модератор глобальный
  • *****
  • Сообщений: 8 999
не получалось ниразу, пробовал на Убунтах, но очень сложно....
Мне не доводилось заниматься подобными вещами, предполагаю, что для включения в домен нужна самба, ведь так ? Думаю, Адрей (Skull) мог бы более конкретно ответить на ваш вопрос или другой кто, из более осведомленных товарищей.

Оффлайн Salomatin

  • Модератор
  • *****
  • Сообщений: 981
    • Пошаговые инструкции
    • Email
Прошу соблюдать порядок и для обсуждения других тем заводить отдельные темы.
Тут обсуждаются и задаются вопросы только по Пошаговым инструкциям.

Спасибо.   
Хочешь понять сам, объясни другому.
"Если уже все испробовал и ничего не помогает - почитай инструкцию"

Оффлайн Skull

  • Глобальный модератор
  • *****
  • Сообщений: 19 918
    • Домашняя страница
    • Email
Возможно ли без проблем включить рабочую станцию Altlinux в домен w2k3?
Теоретически возможно (на форуме это обсуждалось). Но специально этим вопросом никто не занимался, так как делать интеграцию с закрытым неспецифицированным софтом очень муторно. Так что будет как в Ubuntu.
С другой стороны, из коробки предоставляется сервер каталогов на базе Kerberos/OpenLDAP. Читайте об особенностях на http://www.altlinux.org/Кентавр
Андрей Черепанов (cas@)

ska

  • Гость

заходим по адресу http://192.168.0.1 и видим тестовую страницу   It Works
или новую, которую разместили сами в каталог /var/www/html/

заходим по адресу http://192.168.0.1/doc и видим документацию.
Захожу по адресу 192.168.0.1 и вижу документацию, а ожидал увидеть It works ?
вот default.conf

<VirtualHost *:80>
#

ServerAdmin webmasterr@localhost

#DocumentRoot "/usr/share/doc/indexhtml/"
DocumentRoot "/var/www/html/"

#
<Directory />
# Summary: Configure for all dirs by default
# Requires: Directory-root
Include conf/include/Directory_root_default.conf
</Directory>

#
#<Directory "/usr/share/doc/indexhtml/">
<Directory "/var/www/html/">
# Summary: Configure for html documents in DocumentRoot
# Requires: Directory-html
Include conf/include/Directory_html_default.conf
</Directory>

ErrorLog /var/log/httpd2/error_log

#
#
LogLevel warn

<IfModule log_config_module>
#
#
CustomLog /var/log/httpd2/access_log common

</IfModule>

<IfModule alias_module>
#
Alias /doc "/usr/share/doc/indexhtml"
<Directory "/usr/share/doc/indexhtml/">
Include conf/extra-available/Directory_html_default.conf
</Directory>
#
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

</IfModule>

<Directory "/var/www/cgi-bin">
Include conf/include/Directory_cgibin_default.conf
</Directory>
RewriteEngine On
RewriteCond %{HTTPS} !=off
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [R,L]

</VirtualHost>


Оффлайн Salomatin

  • Модератор
  • *****
  • Сообщений: 981
    • Пошаговые инструкции
    • Email
Захожу по адресу 192.168.0.1 и вижу документацию, а ожидал увидеть It works ?

Посмотрите внимательно ролик, так показано как редактировать файлы. Важно не только что изменять, а место расположения. Если вносите другие правки, то должны понимать, что делаете. Например, в инструкции четко указано как делать Шаг 3. А у вас эта часть попала вообще непонятно куда.
Linux не терпит вольностей. Пробел, лишний знак в конфигурационном файле может нарушить настройки. При грамотном использовании работает четко.
Обратите на внимание на используемую версию. В новых версиях есть появляются мелкие изменения.
Скорее всего у вас мелкая ошибка.
Пришлите файлы 
/etc/httpd2/conf/sites-available/default.conf
/etc/httpd2/conf/extra-available/Directory_html_default.conf
такими какие они у вас есть
и номер версии ALT Linux
 
Хочешь понять сам, объясни другому.
"Если уже все испробовал и ничего не помогает - почитай инструкцию"

ska

  • Гость
Скорее всего у вас мелкая ошибка.
Пришлите файлы 
/etc/httpd2/conf/sites-available/default.conf
/etc/httpd2/conf/extra-available/Directory_html_default.conf
такими какие они у вас есть
и номер версии ALT Linux
/etc/httpd2/conf/sites-available/default.conf
#
# Summary: Main server configuration (for default virtual host)
# Provides: VirtualHost
# Provides: VirtualHost-default
#

#
# 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition.  These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

<VirtualHost *:80>
#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
ServerAdmin webmasterr@localhost

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName www.example.com:80

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
#DocumentRoot "/usr/share/doc/indexhtml/"
DocumentRoot "/var/www/html/"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
# Summary: Configure for all dirs by default
# Requires: Directory-root
Include conf/include/Directory_root_default.conf
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
#<Directory "/usr/share/doc/indexhtml/">
<Directory "/var/www/html/">
# Summary: Configure for html documents in DocumentRoot
# Requires: Directory-html
Include conf/include/Directory_html_default.conf
</Directory>

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog /var/log/httpd2/error_log

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

<IfModule log_config_module>
#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here.  Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
CustomLog /var/log/httpd2/access_log common

#
# If you prefer a logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
#CustomLog /var/log/httpd2/access_log combined
</IfModule>

<IfModule alias_module>
#
# Redirect: Allows you to tell clients about documents that used to
# exist in your server's namespace, but do not anymore. The client
# will make a new request for the document at its new location.
# Example:
# Redirect permanent /foo http://www.example.com/bar

#
# Alias: Maps web paths into filesystem paths and is used to
# access content that does not live under the DocumentRoot.
# Example:
# Alias /webpath /full/filesystem/path
#
# If you include a trailing / on /webpath then the server will
# require it to be present in the URL.  You will also likely
# need to provide a <Directory> section to allow access to
# the filesystem path.
Alias /doc "/usr/share/doc/indexhtml"
<Directory "/usr/share/doc/indexhtml/">
Include conf/extra-available/Directory_html_default.conf
</Directory>
#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the target directory are treated as applications and
# run by the server when requested rather than as documents sent to the
# client.  The same rules about trailing "/" apply to ScriptAlias
# directives as to Alias.
#
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

</IfModule>

#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/var/www/cgi-bin">
# Summary: Configure for default CGI directory
# Requires: Directory-cgi
Include conf/include/Directory_cgibin_default.conf
</Directory>
RewriteEngine On
RewriteCond %{HTTPS} !=off
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [R,L]

</VirtualHost>
/etc/httpd2/conf/extra-available/Directory_html_default.conf
#
# Summary: Default config for html documents
# Provides: Directory
# Provides: Directory-html
#

#
# Possible values for the Options directive are "None", "All",
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes Includes FollowSymLinks MultiViews

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
AllowOverride None

<IfModule authz_host_module>
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</IfModule>


Оффлайн Salomatin

  • Модератор
  • *****
  • Сообщений: 981
    • Пошаговые инструкции
    • Email
Ну я даже не знаю. Ошибки не нашел.
Если вы не забыли перезапустить httpd2, то попробуйте зайти с другой станции на веб сервер, может там кеш старую страницу выдает.
Было такое, писали, жаловались, но потом разбирались.
Пишите.
 
Хочешь понять сам, объясни другому.
"Если уже все испробовал и ничего не помогает - почитай инструкцию"

ska

  • Гость
Так и есть. Кэш очистил. It works! )