Re: Настройка apache. Файл .htaccess

2009-12-30 Пенетрантность George Shuklin
В Срд, 30/12/2009 в 18:26 +0200, Alex пишет:
> Забыл =) Не знаю что выкладывать - выложу все.

> 
> 
> Options Indexes FollowSymLinks Includes MultiViews
> 
> AllowOverride All
> 
> Order allow,deny
> 
> Deny from all
> 
> 

Не вижу закрывающего тега раз, два, вы учли существование
sites-avaible/default, в котором свои директивы есть?



Re: Настройка apache. Файл .htaccess

2009-12-30 Пенетрантность Alex
>>apache2ctl graceful делали?

Сделал - не помогло

2009/12/30, Alex :
> Забыл =) Не знаю что выкладывать - выложу все.
>
> # cat ports.conf
>
> # If you just change the port or add more ports here, you will likely also
> # have to change the VirtualHost statement in
> # /etc/apache2/sites-enabled/000-default
> # This is also true if you have upgraded from before 2.2.9-3 (i.e. from
> # Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
> # README.Debian.gz
>
> NameVirtualHost *:80
> Listen 127.0.0.1:80
>
> 
> # If you add NameVirtualHost *:443 here, you will also have to change
> # the VirtualHost statement in /etc/apache2/sites-available/default-ssl
> # to 
> # Server Name Indication for SSL named virtual hosts is currently not
> # supported by MSIE on Windows XP.
> Listen 443
> 
>
> 
> Listen 443
> 
>
>
>
>
> -
>
>
> cat apache2.conf
> #
> # Based upon the NCSA server configuration files originally by Rob McCool.
> #
> # This is the main Apache server configuration file.  It contains the
> # configuration directives that give the server its instructions.
> # See http://httpd.apache.org/docs/2.2/ for detailed information about
> # the directives.
> #
> # 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.
> #
> # The configuration directives are grouped into three basic sections:
> #  1. Directives that control the operation of the Apache server process as
> a
> # whole (the 'global environment').
> #  2. Directives that define the parameters of the 'main' or 'default'
> server,
> # which responds to requests that aren't handled by a virtual host.
> # These directives also provide default values for the settings
> # of all virtual hosts.
> #  3. Settings for virtual hosts, which allow Web requests to be sent to
> # different IP addresses or hostnames and have them handled by the
> # same Apache server process.
> #
> # 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/apache2/foo.log"
> # with ServerRoot set to "" will be interpreted by the
> # server as "//var/log/apache2/foo.log".
> #
>
> ### Section 1: Global Environment
> #
> # The directives in this section affect the overall operation of Apache,
> # such as the number of concurrent requests it can handle or where it
> # can find its configuration files.
> #
> ServerName localhost
> #
> # ServerRoot: The top of the directory tree under which the server's
> # configuration, error, and log files are kept.
> #
> # NOTE!  If you intend to place this on an NFS (or otherwise network)
> # mounted filesystem then please read the LockFile documentation (available
> # at http://httpd.apache.org/docs-2.1/mod/mpm_common.html#lockfile>);
> # you will save yourself a lot of trouble.
> #
> # Do NOT add a slash at the end of the directory path.
> #
> ServerRoot "/etc/apache2"
>
> #
> # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
> #
> #
> #
> LockFile /var/lock/apache2/accept.lock
> #
> #
>
> #
> # PidFile: The file in which the server should record its process
> # identification number when it starts.
> # This needs to be set in /etc/apache2/envvars
> #
> PidFile ${APACHE_PID_FILE}
>
> #
> # Timeout: The number of seconds before receives and sends time out.
> #
> Timeout 300
>
> #
> # KeepAlive: Whether or not to allow persistent connections (more than
> # one request per connection). Set to "Off" to deactivate.
> #
> KeepAlive On
>
> #
> # MaxKeepAliveRequests: The maximum number of requests to allow
> # during a persistent connection. Set to 0 to allow an unlimited amount.
> # We recommend you leave this number high, for maximum performance.
> #
> MaxKeepAliveRequests 100
>
> #
> # KeepAliveTimeout: Number of seconds to wait for the next request from the
> # same client on the same connection.
> #
> KeepAliveTimeout 15
>
> ##
> ## Server-Pool Size Regulation (MPM specific)
> ##
>
> # prefork MPM
> # StartServers: number of server processes to start
> # MinSpareServers: minimum number of server processes which are kept spare
> # MaxSpareServers: maximum number of server processes which are kept spare
> # MaxClients: maximum number of server processes allowed to start
> # MaxRequestsPerChild: maximum number of requests a server process serves
> 
> StartServers  5
> MinSpareServers   5
> MaxSpareServers  10
> MaxClients  150
> MaxRequestsPerChild   0
> 
>
> # worker MPM
> # StartServers: initial number of server processes to start
> # MaxClients: maximum number of simultaneous client connections
> # MinSpareThreads: minimu

Re: Настройка apache. Файл .htaccess

2009-12-30 Пенетрантность Alex
Забыл =) Не знаю что выкладывать - выложу все.

# cat ports.conf

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz

NameVirtualHost *:80
Listen 127.0.0.1:80


# If you add NameVirtualHost *:443 here, you will also have to change
# the VirtualHost statement in /etc/apache2/sites-available/default-ssl
# to 
# Server Name Indication for SSL named virtual hosts is currently not
# supported by MSIE on Windows XP.
Listen 443



Listen 443





-


cat apache2.conf
#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.2/ for detailed information about
# the directives.
#
# 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.
#
# The configuration directives are grouped into three basic sections:
#  1. Directives that control the operation of the Apache server process as a
# whole (the 'global environment').
#  2. Directives that define the parameters of the 'main' or 'default' server,
# which responds to requests that aren't handled by a virtual host.
# These directives also provide default values for the settings
# of all virtual hosts.
#  3. Settings for virtual hosts, which allow Web requests to be sent to
# different IP addresses or hostnames and have them handled by the
# same Apache server process.
#
# 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/apache2/foo.log"
# with ServerRoot set to "" will be interpreted by the
# server as "//var/log/apache2/foo.log".
#

### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#
ServerName localhost
#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE!  If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the LockFile documentation (available
# at http://httpd.apache.org/docs-2.1/mod/mpm_common.html#lockfile>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
ServerRoot "/etc/apache2"

#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
#
#
LockFile /var/lock/apache2/accept.lock
#
#

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
# This needs to be set in /etc/apache2/envvars
#
PidFile ${APACHE_PID_FILE}

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

##
## Server-Pool Size Regulation (MPM specific)
##

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves

StartServers  5
MinSpareServers   5
MaxSpareServers  10
MaxClients  150
MaxRequestsPerChild   0


# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves

StartServers  2
MinSpareThreads  25
MaxSpareThreads  7

Re: Настройка apache. Файл .htaccess

2009-12-30 Пенетрантность George Shuklin
В Срд, 30/12/2009 в 17:51 +0200, Alex пишет:
> Обработку указал явно в apache2.conf. Апач ошибок не выдает. Выставлял
> разные директивы. И закрывал запросом авторизации и вообще deny all
> делал. Редиректы - один фиг не работает. И почему то в apache2.conf
> если указывать deny from all тоже сайт виден

apache2ctl graceful делали?

Кстати, редактировать apache2.conf лучше не надо. Для server-wide
настроек есть /etc/apache2/conf.d, для настроек сайтов лучше
использовать /etc/apache2/sites-avaible с симлинком
на /etc/apache2/sites-enabled.

(моды, соответственно, цепляются симлинком из mods-avaible в
mods-enabled)


Re: Настройка apache. Файл .htaccess

2009-12-30 Пенетрантность Andrey Rahmatullin
On Wed, Dec 30, 2009 at 05:51:28PM +0200, Alex wrote:
> Обработку указал явно в apache2.conf. Апач ошибок не выдает. Выставлял
> разные директивы. И закрывал запросом авторизации и вообще deny all
> делал. Редиректы - один фиг не работает. И почему то в apache2.conf
> если указывать deny from all тоже сайт виден
Вы б куски конфигов привели _хотя_бы_.

-- 
WBR, wRAR (ALT Linux Team)
Powered by the ALT Linux fortune(6):

 * swi узнал новый mime-type
 suslic/file
 его не видно но он есть


signature.asc
Description: Digital signature