Автор Тема: Apache настройка, Web-сервер, Web-интерфес 8080, proxy и общие вопросы.  (Прочитано 230770 раз)

Оффлайн Const

  • Глобальный модератор
  • *****
  • Сообщений: 2 653
  • Даже у плохого модератора есть свои плюсы…
Re: apache или apache2?
« Ответ #270 : 02.02.2010 17:59:43 »
Теперь у вас есть рабочий веб-сервер.. Что вы хотели с него получить-то?

Оффлайн Axe79

  • Завсегдатай
  • *
  • Сообщений: 175
Re: apache или apache2?
« Ответ #271 : 02.02.2010 18:12:10 »
Он то и раньше рабочим был.
В а  вот скрипты из cgi-bin не запускаются...
It`s Work! из папки html печатает.
я выше описывал.(
а скрипты нет.

когда то с модом была проблема но теперь мод то запущен
[root@localhost ~]# /usr/sbin/a2enmod cgi
This module is already enabled!
[root@localhost ~]#    

браузер выдаёт
если скрипт существует
Server error!

The server encountered an internal error and was unable to complete your request.

Error message:
Premature end of script headers: printenv

If you think this is a server error, please contact the webmaster.
Error 500
192.168.0.7
Tue Feb 2 17:10:55 2010
Apache/2.2.8 (Unix) mod_perl/2.0.3 Perl/v5.8.8


либо
если скрипта нет

Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.
Error 404
192.168.0.7
Tue Feb 2 17:11:39 2010
Apache/2.2.8 (Unix) mod_perl/2.0.3 Perl/v5.8.8


значит скрипт оно видит...
« Последнее редактирование: 02.02.2010 18:21:10 от Axe79 »
Ничто так не стимулирует тягу к труду интеллектуальному, как обилие труда физического!
Gutta cavat lapidem non vi, sed saepe cadendo Капля долбит камень не силой, а частым падени

Оффлайн Const

  • Глобальный модератор
  • *****
  • Сообщений: 2 653
  • Даже у плохого модератора есть свои плюсы…
Re: apache или apache2? запуск CGI
« Ответ #272 : 02.02.2010 19:22:58 »
А у вас пакет apache2-cgi-bin установлен?

Оффлайн Axe79

  • Завсегдатай
  • *
  • Сообщений: 175
Re: apache или apache2? запуск CGI
« Ответ #273 : 02.02.2010 20:11:35 »
А у вас пакет apache2-cgi-bin установлен?
сейчас проверим
...
Чесно говоря нигде не нашел такого мода
ни в локале ни во внешних репозиториях
может подскажете адрес?
« Последнее редактирование: 02.02.2010 20:26:28 от Axe79 »
Ничто так не стимулирует тягу к труду интеллектуальному, как обилие труда физического!
Gutta cavat lapidem non vi, sed saepe cadendo Капля долбит камень не силой, а частым падени

Оффлайн Axe79

  • Завсегдатай
  • *
  • Сообщений: 175
Re: apache или apache2? запуск CGI
« Ответ #274 : 02.02.2010 20:39:08 »
может как то по другому называется?
стандартный cgi есть
Ничто так не стимулирует тягу к труду интеллектуальному, как обилие труда физического!
Gutta cavat lapidem non vi, sed saepe cadendo Капля долбит камень не силой, а частым падени

Оффлайн Const

  • Глобальный модератор
  • *****
  • Сообщений: 2 653
  • Даже у плохого модератора есть свои плюсы…
Re: apache или apache2? запуск CGI
« Ответ #275 : 02.02.2010 21:00:36 »
$ apt-cache search apache2 cgi
apache2-full - Самый популярный веб-сервер Internet (full)
apache2-mod_fcgid - Apache2 module for high-performance server-side scripting
apache2-mod_perl - встроенный интерпретатор Perl для веб-сервера Apache2
apache2-mod_php5 - The PHP5 HTML-embedded scripting language for use with Apache2
apache2-mod_python - Python module for Apache2
apache2-mod_scgi - An Apache 2.0 module that implements the client side of the SCGI protocol
apache2-cgi-bin - cgi-bin для Apache
apache2-cgi-bin-printenv - cgi-bin/printenv для Apache
apache2-cgi-bin-test-cgi - cgi-bin/test-cgi для Apache
apache2-compat - Установка DocumentRoot в /var/www/apache2
apache2-datadirs - каталоги данных для Apache

Оффлайн Axe79

  • Завсегдатай
  • *
  • Сообщений: 175
Re: apache или apache2? запуск CGI
« Ответ #276 : 02.02.2010 21:07:57 »
у меня только:
[root@localhost ~]# apt-cache search apache2 cgi
apache2-mod_perl - an embedded Perl interpreter for the Apache2 Web server
apache2-mod_fcgid - Apache2 module for high-performance server-side scripting
apache2-mod_php - The PHP4 HTML-embedded scripting language for use with Apache2
apache2-mod_php5 - The PHP5 HTML-embedded scripting language for use with Apache2
apache2-mod_python - Python module for Apache2
[root@localhost ~]# 

Подскажите пожалуйста как и откуда доставить недостающие компоненты.
Ничто так не стимулирует тягу к труду интеллектуальному, как обилие труда физического!
Gutta cavat lapidem non vi, sed saepe cadendo Капля долбит камень не силой, а частым падени

Оффлайн Salomatin

  • Модератор раздела
  • ****
  • Сообщений: 984
    • Пошаговые инструкции
    • Email
Re: apache или apache2?
« Ответ #277 : 02.02.2010 21:10:15 »
Он то и раньше рабочим был.
В а  вот скрипты из cgi-bin не запускаются...
It`s Work! из папки html печатает.
я выше описывал.(
а скрипты нет.

Для apache:
Разрешаем  веб серверу cgi-script  .cgi .pl файлы
в конец /etc/httpd/conf/httpd.conf добавляем

AddHandler  cgi-script  .cgi .pl

<Directory /var/www/html/наш_каталог>

    Options     ExecCGI         Indexes
</Directory>


Для apache2, тоже также можно стандартному  каталогу добавить

/etc/httpd2/conf/extra-available/Directory_html_default.conf

строка
Options Indexes Includes FollowSymLinks MultiViews
сделать
Options Indexes Includes FollowSymLinks MultiViews ExecCGI

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

Оффлайн ruslandh

  • Поспешай не торопясь !
  • Модератор глобальный
  • *****
  • Сообщений: 32 299
  • Учиться .... Телепатами не рождаются, ими ....
    • Email
Re: apache или apache2? запуск CGI
« Ответ #278 : 02.02.2010 21:37:04 »
А какой у вас репозиторий?

Оффлайн Axe79

  • Завсегдатай
  • *
  • Сообщений: 175
Re: apache или apache2? запуск CGI
« Ответ #279 : 02.02.2010 22:29:51 »
непошло((
вот /etc/httpd2/conf/sites-available/default.conf
#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "/var/log/httpd2/foo_log"
# with ServerRoot set to "/etc/httpd2" will be interpreted by the
# server as "/etc/httpd2//var/log/httpd2/foo_log".

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to point the LockFile directive
# at a local disk.  If you wish to share the same ServerRoot for multiple
# httpd daemons, you will need to change at least LockFile and PidFile.
#
ServerRoot "/etc/httpd2"

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
# Include module configuration:
Include conf/mods-enabled/*.load
Include conf/mods-enabled/*.conf

# Include ports listing
Include conf/ports-enabled/*.conf

<IfModule !mpm_netware_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User apache2
Group apache2
</IfModule>

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

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
<IfModule authz_host_module>
Order allow,deny
Deny from all
</IfModule>
Satisfy All
</FilesMatch>

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

#
# DefaultType: the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value.  If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/plain

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#

#
# EnableMMAP and EnableSendfile: On systems that support it,
# memory-mapping or the sendfile syscall is used to deliver
# files.  This usually improves server performance, but must
# be turned off when serving from networked-mounted
# filesystems or if support for these functions is otherwise
# broken on your system.
#
#EnableMMAP off
#EnableSendfile off

# Supplemental configuration
#
# The configuration files in the conf/extra/ directory can be
# included to add extra features or to modify the default configuration of
# the server, or you may simply copy their contents here and change as
# necessary.

# Various default settings
Include conf/extra-enabled/*.conf

# Include the virtual host configurations:
Include conf/sites-enabled/*.conf
AddHandler  cgi-script  .cgi .pl

<Directory /var/www/apache2/cgi-bin>

    </Directory>

вот /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 Includes FollowSymLinks MultiViews
Options Indexes Includes FollowSymLinks MultiViews ExecCGI

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

DirectoryIndex index

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

к стати а может рихтовать надо было  /etc/httpd2/conf/extra-available/Directory_cgi-bin_default.conf
Ничто так не стимулирует тягу к труду интеллектуальному, как обилие труда физического!
Gutta cavat lapidem non vi, sed saepe cadendo Капля долбит камень не силой, а частым падени

Оффлайн Axe79

  • Завсегдатай
  • *
  • Сообщений: 175
Re: apache или apache2? запуск CGI
« Ответ #280 : 02.02.2010 23:52:08 »
А какой у вас репозиторий?
я отметил все репозитории что были в Synaptic
Ничто так не стимулирует тягу к труду интеллектуальному, как обилие труда физического!
Gutta cavat lapidem non vi, sed saepe cadendo Капля долбит камень не силой, а частым падени

Оффлайн Const

  • Глобальный модератор
  • *****
  • Сообщений: 2 653
  • Даже у плохого модератора есть свои плюсы…
Re: apache или apache2? запуск CGI
« Ответ #281 : 03.02.2010 06:56:39 »

Оффлайн Axe79

  • Завсегдатай
  • *
  • Сообщений: 175
Re: apache или apache2? запуск CGI
« Ответ #282 : 05.02.2010 20:21:04 »
нашел на сизифе
apache2-cgi-bin-2.2.14-alt4.noarch.rpm
в составе
 apache2-2.2.14-alt4.src.rpm

теперь парюсь с hasher

[axe@localhost ffl]$ hsh ~/hasher /home/axe/ffl/apache2-2.2.14-alt4.src.rpm
E: Программа обработки метода /usr/lib/apt/methods/rsync не найдена.
E: Программа обработки метода /usr/lib/apt/methods/rsync не найдена.
E: Программа обработки метода /usr/lib/apt/methods/rsync не найдена.
E: Программа обработки метода /usr/lib/apt/methods/rsync не найдена.
E: Программа обработки метода /usr/lib/apt/methods/rsync не найдена.
E: Программа обработки метода /usr/lib/apt/methods/rsync не найдена.
E: Программа обработки метода /usr/lib/apt/methods/rsync не найдена.
E: Программа обработки метода /usr/lib/apt/methods/rsync не найдена.
E: Программа обработки метода /usr/lib/apt/methods/rsync не найдена.
W: Невозможно получить или проверить файлы описания некоторых репозиториев. Эти репозитории будут игнорироваться.
E: Tried to dequeue a fetching object
(много раз)
никак не разберусь как  создать файл со списком репозиториев, как он должен называться
внятных подробностей не нашел(
или подскажите другой метод установки *.src.rpm

есть ещё вопрос : как определить какая у тебя  платформа
« Последнее редактирование: 05.02.2010 21:10:40 от Axe79 »
Ничто так не стимулирует тягу к труду интеллектуальному, как обилие труда физического!
Gutta cavat lapidem non vi, sed saepe cadendo Капля долбит камень не силой, а частым падени

Оффлайн ruslandh

  • Поспешай не торопясь !
  • Модератор глобальный
  • *****
  • Сообщений: 32 299
  • Учиться .... Телепатами не рождаются, ими ....
    • Email
Re: apache или apache2? запуск CGI
« Ответ #283 : 05.02.2010 21:31:32 »
rsync нафига включён?

Оффлайн Axe79

  • Завсегдатай
  • *
  • Сообщений: 175
Re: apache или apache2? запуск CGI
« Ответ #284 : 05.02.2010 22:07:19 »

rsync нафига включён?

хрен его знает
демона rsyncd в /etc не нашел
« Последнее редактирование: 05.02.2010 22:17:37 от Axe79 »
Ничто так не стимулирует тягу к труду интеллектуальному, как обилие труда физического!
Gutta cavat lapidem non vi, sed saepe cadendo Капля долбит камень не силой, а частым падени