Доброго Времени Суток!
У меня такая проблема. Есть сервер на который подцеплен домен типа http://second.mydomain.my и на серваке в отдельном разделе висит веб морда http://second.mydomain.my/webface
Собственно проблема в том что при обращении к серверу по имени домена (http://second.mydomain.my) он в 90% случаях пишет 403 ошибку типа доступ запрещен. Когда обращаюсь на http://second.mydomain.my/webface он пишет 404 типа объект не найден. Самое интересное что если я на сервер захожу через http://webwarper.net/ то он мне выдает "IT's Work!" то есть все норма, но если я через эту же проксю захожу на http://second.mydomain.my/webface он пишет так 404 ошибку.
А самое веселое что когда я захожу на прямую по ip адресу все работает прекрасно. Но меня больше всего поражает что иногда сервер работает нормально то есть я захожу на http://second.mydomain.my или на http://second.mydomain.my/webface и все прекрасно работает, но это бывает очень редко. В апаче я настроил доменное имя. Пожалуйста помогите.
Apache в OpenSuse 11.2 (Проблема с работой апачан на сусе)
Модератор: Модераторы разделов
Re: Apache в OpenSuse 11.2
Думаю что пробема в том что ваш апач, не знает что при обращении к нему с этим доменным именем в строке запроса надо показывать указанный вами каталог. И поэтому он пытается показывать какой то другой, или вообще ничего не пытается показывать.
У хостеров на одном сервере до 100 разный сайтов с разными доменами, по этому сервер при выборе каталога к которому обращается пользователь смотрит на доменное имя в запросе.
Попробуйте воспользоваться документацией http://www.apache.ru/docs/rabota.html в частности раздел Настройка виртуальных серверов в файле httpd.conf что бы указать доменное имя для вашего каталога.
Или задать директиву DocumentRoot с указанием домена в access.conf
Сам apach никогда не настраивал так что могу в чем то ошибаться но думаю что проблема именно в том что апач не знает что он должен делать если к нему обращаются по этому домену.
У хостеров на одном сервере до 100 разный сайтов с разными доменами, по этому сервер при выборе каталога к которому обращается пользователь смотрит на доменное имя в запросе.
Попробуйте воспользоваться документацией http://www.apache.ru/docs/rabota.html в частности раздел Настройка виртуальных серверов в файле httpd.conf что бы указать доменное имя для вашего каталога.
Или задать директиву DocumentRoot с указанием домена в access.conf
Сам apach никогда не настраивал так что могу в чем то ошибаться но думаю что проблема именно в том что апач не знает что он должен делать если к нему обращаются по этому домену.
Re: Apache в OpenSuse 11.2
birdfree
а вы куда dns имена прописсали? в /etc/hosts? (если да то при хождении через прокси /etc/hosts не смотрится)
а вы куда dns имена прописсали? в /etc/hosts? (если да то при хождении через прокси /etc/hosts не смотрится)
Fury in my eyes, sword on my side
Afro on my head, I'm a black Samurai
Number One, I bring my whole nation alive
Escape death, to become immortalized
Afro on my head, I'm a black Samurai
Number One, I bring my whole nation alive
Escape death, to become immortalized
Re: Apache в OpenSuse 11.2
Воть... Выкладываю конфиг. Пожалуйста взгляните что может быть не так.
Еще я так же выкладываю default-server.conf может быть я в нем накосячил..
Код: Выделить всё
### Global Environment ######################################################
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests.
# run under this user/group id
Include /etc/apache2/uid.conf
# - how many server processes to start (server pool regulation)
# - usage of KeepAlive
Include /etc/apache2/server-tuning.conf
# 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/apache2/error_log
# generated from APACHE_MODULES in /etc/sysconfig/apache2
Include /etc/apache2/sysconfig.d/loadmodule.conf
# IP addresses / ports to listen on
Include /etc/apache2/listen.conf
# predefined logging formats
Include /etc/apache2/mod_log_config.conf
# generated from global settings in /etc/sysconfig/apache2
Include /etc/apache2/sysconfig.d/global.conf
# optional mod_status, mod_info
Include /etc/apache2/mod_status.conf
Include /etc/apache2/mod_info.conf
# optional cookie-based user tracking
# read the documentation before using it!!
Include /etc/apache2/mod_usertrack.conf
# configuration of server-generated directory listings
Include /etc/apache2/mod_autoindex-defaults.conf
# associate MIME types with filename extensions
TypesConfig /etc/apache2/mime.types
DefaultType text/plain
Include /etc/apache2/mod_mime-defaults.conf
# set up (customizable) error responses
Include /etc/apache2/errors.conf
# global (server-wide) SSL configuration, that is not specific to
# any virtual host
Include /etc/apache2/ssl-global.conf
# forbid access to the entire filesystem by default
<Directory "/">
Options None
AllowOverride None
allow from all
</Directory>
# use .htaccess files for overriding,
AccessFileName .htaccess
# and never show them
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
# List of resources to look for when the client requests a directory
DirectoryIndex index.html index.html.var
### '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.
#
Include /etc/apache2/default-server.conf
# Another way to include your own files
#
# The file below is generated from /etc/sysconfig/apache2,
# include arbitrary files as named in APACHE_CONF_INCLUDE_FILES and
# APACHE_CONF_INCLUDE_DIRS
Include /etc/apache2/sysconfig.d/include.conf
### Virtual server configuration ############################################
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs-2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
Include /etc/apache2/vhosts.d/*.conf
# Note: instead of adding your own configuration here, consider
# adding it in your own file (/etc/apache2/httpd.conf.local)
# putting its name into APACHE_CONF_INCLUDE_FILES in
# /etc/sysconfig/apache2 -- this will make system updates
# easier :)
Еще я так же выкладываю default-server.conf может быть я в нем накосячил..
Код: Выделить всё
#
# Global configuration that will be applicable for all virtual hosts, unless
# deleted here, or overriden elswhere.
#
DocumentRoot "/srv/www/htdocs"
#
# Configure the DocumentRoot
#
<Directory "/srv/www/htdocs">
# 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 None
# 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
# Controls who can get stuff from this server.
Order allow,deny
Allow from all
</Directory>
# Aliases: aliases can be added as needed (with no limit). The format is
# Alias fakename realname
#
# Note that if you include a trailing / on fakename then the server will
# require it to be present in the URL. So "/icons" isn't aliased in this
# example, only "/icons/". If the fakename is slash-terminated, then the
# realname must also be slash terminated, and if the fakename omits the
# trailing slash, the realname must also omit it.
#
# We include the /icons/ alias for FancyIndexed directory listings. If you
# do not use FancyIndexing, you may comment this out.
#
Alias /icons/ "/usr/share/apache2/icons/"
<Directory "/usr/share/apache2/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname 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/ "/srv/www/cgi-bin/"
# "/srv/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/srv/www/cgi-bin">
AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from all
</Directory>
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
# To disable it, simply remove userdir from the list of modules in APACHE_MODULES
# in /etc/sysconfig/apache2.
#
<IfModule mod_userdir.c>
# Note that the name of the user directory ("public_html") cannot simply be
# changed here, since it is a compile time setting. The apache package
# would have to be rebuilt. You could work around by deleting
# /usr/sbin/suexec, but then all scripts from the directories would be
# executed with the UID of the webserver.
UserDir public_html
# The actual configuration of the directory is in
# /etc/apache2/mod_userdir.conf.
Include /etc/apache2/mod_userdir.conf
</IfModule>
# Include all *.conf files from /etc/apache2/conf.d/.
#
# This is mostly meant as a place for other RPM packages to drop in their
# configuration snippet.
#
# You can comment this out here if you want those bits include only in a
# certain virtual host, but not here.
#
Include /etc/apache2/conf.d/*.conf
# The manual... if it is installed ('?' means it won't complain)
Include /etc/apache2/conf.d/apache2-manual?conf
ServerName http://second.mydomain.my
ServerAdmin admin@mydomain.my
Re: Apache в OpenSuse 11.2
Мы немножко не поняли друг-друга я имел ввиду что когда я захожу через webwarper.net (его собственно можно считать проксей) то апач мне выдает страничку "It's Work!" но в заветный раздел на сервере так и не пускает... Пишет не возможно найти... А когда я просто пытаюсь зайти на свой сервер из дома на пример, не через webwarper.net то он мне пишет 403 ошибку а при обращении к заветному разделу он пишет вообще 404...
Re: Apache в OpenSuse 11.2
покажите vhost.d/*.conf
в любом случае где определены имена хостов?
при доступе (при котором вы получаете 403) смотрите /var/log/apache2/error_log
с названием файла могу наврать
в любом случае где определены имена хостов?
при доступе (при котором вы получаете 403) смотрите /var/log/apache2/error_log
с названием файла могу наврать
Fury in my eyes, sword on my side
Afro on my head, I'm a black Samurai
Number One, I bring my whole nation alive
Escape death, to become immortalized
Afro on my head, I'm a black Samurai
Number One, I bring my whole nation alive
Escape death, to become immortalized
Re: Apache в OpenSuse 11.2
Уважаемый k0da! Благодарю вас! Вы мне подсказали ошибку! Дело в том что мой напарник поднимал сервер и в файле hosts было пара левых строк, сейчас я их удалил и вроде все работает! Но я боюсь что это временно, потому что сервер иногда и так прорывает поработать а потом он вдруг отваливается, в 90 случаев как я и писал он не работает при обращении по доменному имени.
Re: Apache в OpenSuse 11.2
Всем спасибо! Ошибка заключалась в хостинг провайдере, который почему то моему домену присвоил мой ip который я требовал, но при этом не удалили алиас на свой ip адрес вот и получилось что я время от времени попадал на сервер хотера. Блин-блин-блин... Простите за беспокойство.