<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Linux Forum &mdash; Apache]]></title>
	<link rel="self" href="https://linuxforum.ru/extern.php?action=feed&amp;tid=36248&amp;type=atom" />
	<updated>2014-11-05T15:54:50Z</updated>
	<generator>PunBB</generator>
	<id>https://linuxforum.ru/viewtopic.php?id=36248</id>
		<entry>
			<title type="html"><![CDATA[Re: Apache]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=429990#p429990" />
			<content type="html"><![CDATA[<p>здравствуйте! Искал, куда отписать, решил, что вопрос именно по апачу.<br />Итак, у меня есть VPS на базе CentOS 6/Apache2/PHP5.3.3</p><p>На одном из доменов стоит VOC++BSE. На домене Apache2/PHP5.3.3, PHP работает как модуль CGI. Раньше PHP работал как модуль apache, теперь не проходит авторизация в любом из устанавливаемых CMS. Скажу сразу - раньше такого не было. Помогите запустить грамотно PHP как модуль Apache</p><p>Скрины приложены. Имена аттачей скажут все сами&nbsp; <img src="https://linuxforum.ru/img/smilies/ag.gif" alt="ag" /> <br /></p><div class="codebox"><pre><code>Работа CMS с PHP как модуль CGI
http://test.blanet.ru/screen_php_module_cgi.jpg

Работа CMS с PHP как модуль APACHE
http://test.blanet.ru/screen_php_modle_apache.jpg</code></pre></div>]]></content>
			<author>
				<name><![CDATA[prokofief]]></name>
				<uri>https://linuxforum.ru/profile.php?id=35987</uri>
			</author>
			<updated>2014-11-05T15:54:50Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=429990#p429990</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Apache]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=425143#p425143" />
			<content type="html"><![CDATA[<p>Разобрался&nbsp; владелец папок был root, а юзер от которого запускался апач был - apache</p>]]></content>
			<author>
				<name><![CDATA[spirit1086]]></name>
				<uri>https://linuxforum.ru/profile.php?id=28962</uri>
			</author>
			<updated>2014-10-06T16:11:42Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=425143#p425143</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Apache]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=424539#p424539" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>kostik87 пишет:</cite><blockquote><p>Можно и так, но в моём дистрибутиве владельцем /var/www как раз и является пользователь от которого запускается web сервер, в CentOS, скорее всего, так же, да и выполнить</p></blockquote></div><p>Оно то можно, но нет гарантий что это поможет, а вот если пользователь от которого запускается вэб-сервер имеет доступ к файлу то этой ошибки гарантировано уже не будет. Ведь как показывает практика - нельзя полагаться на &quot;скорее всего&quot;&nbsp; <img src="https://linuxforum.ru/img/smilies/ab.gif" alt="ab" /></p>]]></content>
			<author>
				<name><![CDATA[beliy]]></name>
				<uri>https://linuxforum.ru/profile.php?id=34742</uri>
			</author>
			<updated>2014-10-02T13:03:40Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=424539#p424539</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Apache]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=424536#p424536" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>beliy пишет:</cite><blockquote><p>Не совсем верно высказались - нужно посмотреть от имени какого пользователя запускается web-сервер</p></blockquote></div><p>Можно и так, но в моём дистрибутиве владельцем /var/www как раз и является пользователь от которого запускается web сервер, в CentOS, скорее всего, так же, да и выполнить <br /></p><div class="codebox"><pre><code>stat /var/www</code></pre></div><p>проще, чем просмотреть сценарий запуска apache или список пользователей в системе.</p>]]></content>
			<author>
				<name><![CDATA[kostik87]]></name>
				<uri>https://linuxforum.ru/profile.php?id=34705</uri>
			</author>
			<updated>2014-10-02T12:56:33Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=424536#p424536</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Apache]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=424534#p424534" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>kostik87 пишет:</cite><blockquote><p>Посмотрите кто владелец /var/www и выставьте такого же владельца у файлов в /var/www/html/site.ru.</p></blockquote></div><p>Не совсем верно высказались - нужно посмотреть от имени какого пользователя запускается web-сервер и проставить права так что б для данного пользователя был доступ к файлам.</p>]]></content>
			<author>
				<name><![CDATA[beliy]]></name>
				<uri>https://linuxforum.ru/profile.php?id=34742</uri>
			</author>
			<updated>2014-10-02T12:51:34Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=424534#p424534</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Apache]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=424531#p424531" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>spirit1086 пишет:</cite><blockquote><p>You don&#039;t have permission to access /index.php on this server.</p></blockquote></div><p>Посмотрите кто владелец /var/www и выставьте такого же владельца у файлов в /var/www/html/site.ru.</p>]]></content>
			<author>
				<name><![CDATA[kostik87]]></name>
				<uri>https://linuxforum.ru/profile.php?id=34705</uri>
			</author>
			<updated>2014-10-02T12:42:41Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=424531#p424531</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Apache]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=424530#p424530" />
			<content type="html"><![CDATA[<p>Покажите error.log апача</p>]]></content>
			<author>
				<name><![CDATA[Marley]]></name>
				<uri>https://linuxforum.ru/profile.php?id=33858</uri>
			</author>
			<updated>2014-10-02T12:40:51Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=424530#p424530</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Apache]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=424495#p424495" />
			<content type="html"><![CDATA[<p>Здравствуйте установил httpd, php, mysql <br />Мой конфиг httpd<br /></p><div class="codebox"><pre><code>#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See &lt;URL:http://httpd.apache.org/docs/2.4/&gt; for detailed information.
# In particular, see 
# &lt;URL:http://httpd.apache.org/docs/2.4/mod/directives.html&gt;
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They&#039;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&#039;s control files begin with &quot;/&quot; (or &quot;drive:/&quot; for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with &quot;/&quot;, the value of ServerRoot is prepended -- so &#039;log/access_log&#039;
# with ServerRoot set to &#039;/www&#039; will be interpreted by the
# server as &#039;/www/log/access_log&#039;, where as &#039;/log/access_log&#039; will be
# interpreted as &#039;/log/access_log&#039;.

#
# ServerRoot: The top of the directory tree under which the server&#039;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 specify a local disk on the
# Mutex directive, if file-based mutexes are used.  If you wish to share the
# same ServerRoot for multiple httpd daemons, you will need to change at
# least PidFile.
#
ServerRoot &quot;/etc/httpd&quot;

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the &lt;VirtualHost&gt;
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80

#
# 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&#039; 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&#039;) do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
Include conf.modules.d/*.conf

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

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

#
# 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 root@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&#039;t have a registered DNS name, enter its IP address here.
#
#ServerName www.example.com:80

#
# Deny access to the entirety of your server&#039;s filesystem. You must
# explicitly permit access to web content directories in other 
# &lt;Directory&gt; blocks below.
#
&lt;Directory /&gt;
    AllowOverride All
    Require all denied
&lt;/Directory&gt;

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

#
# 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 &quot;/var/www/html&quot;

#
# Relax access to content within /var/www.
#
&lt;Directory &quot;/var/www&quot;&gt;
    AllowOverride All
    # Allow open access:
    Require all granted
&lt;/Directory&gt;

# Further relax access to the default document root:
&lt;Directory &quot;/var/www/html&quot;&gt;
    #
    # Possible values for the Options directive are &quot;None&quot;, &quot;All&quot;,
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that &quot;MultiViews&quot; must be named *explicitly* --- &quot;Options All&quot;
    # doesn&#039;t give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

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

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
&lt;/Directory&gt;

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
&lt;IfModule dir_module&gt;
    DirectoryIndex index.html
&lt;/IfModule&gt;

#
# The following lines prevent .htaccess and .htpasswd files from being 
# viewed by Web clients. 
#
&lt;Files &quot;.ht*&quot;&gt;
    Require all denied
&lt;/Files&gt;

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a &lt;VirtualHost&gt;
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a &lt;VirtualHost&gt;
# container, that host&#039;s errors will be logged there and not here.
#
ErrorLog &quot;logs/error_log&quot;

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

&lt;IfModule log_config_module&gt;
    #
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    #
    LogFormat &quot;%h %l %u %t \&quot;%r\&quot; %&gt;s %b \&quot;%{Referer}i\&quot; \&quot;%{User-Agent}i\&quot;&quot; combined
    LogFormat &quot;%h %l %u %t \&quot;%r\&quot; %&gt;s %b&quot; common

    &lt;IfModule logio_module&gt;
      # You need to enable mod_logio.c to use %I and %O
      LogFormat &quot;%h %l %u %t \&quot;%r\&quot; %&gt;s %b \&quot;%{Referer}i\&quot; \&quot;%{User-Agent}i\&quot; %I %O&quot; combinedio
    &lt;/IfModule&gt;

    #
    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a &lt;VirtualHost&gt;
    # container, they will be logged here.  Contrariwise, if you *do*
    # define per-&lt;VirtualHost&gt; access logfiles, transactions will be
    # logged therein and *not* in this file.
    #
    #CustomLog &quot;logs/access_log&quot; common

    #
    # If you prefer a logfile with access, agent, and referer information
    # (Combined Logfile Format) you can use the following directive.
    #
    CustomLog &quot;logs/access_log&quot; combined
&lt;/IfModule&gt;

&lt;IfModule alias_module&gt;
    #
    # Redirect: Allows you to tell clients about documents that used to 
    # exist in your server&#039;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 &lt;Directory&gt; section to allow access to
    # the filesystem path.

    #
    # 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 &quot;/&quot; apply to ScriptAlias
    # directives as to Alias.
    #
    ScriptAlias /cgi-bin/ &quot;/var/www/cgi-bin/&quot;

&lt;/IfModule&gt;

#
# &quot;/var/www/cgi-bin&quot; should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
&lt;Directory &quot;/var/www/cgi-bin&quot;&gt;
    AllowOverride All
    Options None
    Require all granted
&lt;/Directory&gt;

&lt;IfModule mime_module&gt;
    #
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    #
    TypesConfig /etc/mime.types

    #
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #
    #AddType application/x-gzip .tgz
    #
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    #
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    #
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz

    #
    # AddHandler allows you to map certain file extensions to &quot;handlers&quot;:
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    #
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add &quot;ExecCGI&quot; to the &quot;Options&quot; directive.)
    #
    #AddHandler cgi-script .cgi

    # For type maps (negotiated resources):
    #AddHandler type-map var

    #
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add &quot;Includes&quot; to the &quot;Options&quot; directive.)
    #
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
&lt;/IfModule&gt;

#
# Specify a default charset for all content served; this enables
# interpretation of all content as UTF-8 by default.  To use the 
# default browser choice (ISO-8859-1), or to allow the META tags
# in HTML content to override this choice, comment out this
# directive:
#
AddDefaultCharset UTF-8

&lt;IfModule mime_magic_module&gt;
    #
    # The mod_mime_magic module allows the server to use various hints from the
    # contents of the file itself to determine its type.  The MIMEMagicFile
    # directive tells the module where the hint definitions are located.
    #
    MIMEMagicFile conf/magic
&lt;/IfModule&gt;

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

#
# EnableMMAP and EnableSendfile: On systems that support it, 
# memory-mapping or the sendfile syscall may be 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.
# Defaults if commented: EnableMMAP On, EnableSendfile Off
#
#EnableMMAP off
EnableSendfile on

# Supplemental configuration
#
# Load config files in the &quot;/etc/httpd/conf.d&quot; directory, if any.
IncludeOptional conf.d/*.conf</code></pre></div><p>Файлы сайта лежат в /var/www/html/site.ru<br />при заходе на сайт в браузере&nbsp; </p><div class="codebox"><pre><code>Forbidden

You don&#039;t have permission to access /index.php on this server.</code></pre></div>]]></content>
			<author>
				<name><![CDATA[spirit1086]]></name>
				<uri>https://linuxforum.ru/profile.php?id=28962</uri>
			</author>
			<updated>2014-10-02T10:18:31Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=424495#p424495</id>
		</entry>
</feed>
