0 Пользователей и 1 Гость просматривают эту тему.
  • 9 Ответов
  • 8167 Просмотров
*

malavka

  • Осваиваюсь на форуме
  • 48
  • 1 / 0
Привет, ребята!

Поставил вчера последний апач, мускул и PHP на винду.

В апаче создал виртуальный хост в httpd-vhosts.conf

Назвал его dev.domen.ru :

Код
<VirtualHost *:80>
    ServerName dev.domen.ru
    DocumentRoot "d:/Server/www/dev"  
    ErrorLog "d:/Server/www/dev/logs/error.log"
    CustomLog "d:/Server/www/dev/logs/access.log" common
</VirtualHost>



В hosts прописал:
127.0.0.1   dev.domen.ru

Создал папку dev в www апача.

Поднял акибабекап тут, но - с сайта, который назвается domen.ru , а не dev.domen.ru

Проблема - не работают родные SEF - 404 ошибка.

Подскажите, что поправить и как в .htaccess  в моем случае?  Апач надо настраивать?

Вот мой .htaccess  сейчас (дефолтный):
Код
##
# @version $Id: htaccess.txt 14401 2010-01-26 14:10:00Z louis $
# @package Joomla
# @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##


#####################################################
#  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your SEF url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
#
#####################################################

##  Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
#  mod_rewrite in use

#RewriteEngine On

########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
## Deny access to extension XML files (uncomment out to activate)
#<Files ~ "\.xml$">
#Order allow,deny
#Deny from all
#Satisfy all
#</Files>
## End of deny access to extension XML files
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits

#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update Your Joomla! Directory (just / for root)

# RewriteBase /


########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$  [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section
« Последнее редактирование: 16.01.2011, 10:24:04 от malavka »
*

SDKiller

  • Живу я здесь
  • 2706
  • 329 / 5
  • ...ergo sum
Re: Проблема с SEF в субдомене
« Ответ #1 : 15.01.2011, 21:09:07 »
Попробуй RewriteEngine On раскомментировать для начала
*

malavka

  • Осваиваюсь на форуме
  • 48
  • 1 / 0
Re: Проблема с SEF в субдомене
« Ответ #2 : 15.01.2011, 21:24:48 »
Раскомментировал.


#
#  mod_rewrite in use

RewriteEngine On


Пока -
404 Not Found

The requested URL /блаблабла.html was not found on this server.
*

SDKiller

  • Живу я здесь
  • 2706
  • 329 / 5
  • ...ergo sum
Re: Проблема с SEF в субдомене
« Ответ #3 : 15.01.2011, 21:43:33 »
Посмотрел ради интереса, что Денвер пишет для субдомена:

Код
<VirtualHost 127.0.0.1:80>
  DocumentRoot "Z:/home/main.ru/west" 
  ServerName "west.main.ru"
  ServerAlias "west.main.ru" "www.west.main.ru"
  ScriptAlias /cgi/ "/home/main.ru/cgi/"
  ScriptAlias /cgi-bin/ "/home/main.ru/cgi-bin/"
</VirtualHost>

При этом SEF работает, причём на хостинге сайт стоит не субдоменом и называется совсем по другому.
Акибой правда не пользуюсь.
*

malavka

  • Осваиваюсь на форуме
  • 48
  • 1 / 0
Re: Проблема с SEF в субдомене
« Ответ #4 : 15.01.2011, 22:57:56 »
Не помогло, к сожалению.

Сделал в httpd-vhosts.conf

Код
<VirtualHost 127.0.0.1:80>
  DocumentRoot "d:/Server/www/domen.ru/dev" 
  ServerName "dev.domen.ru"
  ServerAlias "dev.domen.ru" "www.dev.domen.ru"
  ErrorLog "d:/Server/www/domen.ru/dev/logs/error.log"
  CustomLog "d:/Server/www/domen.ru/dev/logs/access.log" common
  ScriptAlias /cgi/ "/www/domen.ru/cgi/"
  ScriptAlias /cgi-bin/ "/www/domen.ru/cgi-bin/"
</VirtualHost>

Переделал структуру папок, заново поднял в dev.domen.ru , но SEF не работает. Без СЕФ, все ОК.

Подозреваю, что надо .htaccess , но пока не получилось. Гуглил, но решения не нашел для себя.
*

malavka

  • Осваиваюсь на форуме
  • 48
  • 1 / 0
Re: Проблема с SEF в субдомене
« Ответ #5 : 15.01.2011, 23:11:21 »
Проблема локализована.
Заработало СЕО. Но не все ок: Использовать mod_rewrite не работает

Так работает:

Включить SEO    - Да
Использовать mod_rewrite -   Нет
Добавить суффикс к URL - Да

Так не работает:

Включить SEO    - Да
Использовать mod_rewrite -   Да
Добавить суффикс к URL - Да

чтакцесс дефолтный.

Код
##
# @version $Id: htaccess.txt 14401 2010-01-26 14:10:00Z louis $
# @package Joomla
# @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##


#####################################################
#  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your SEF url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
#
#####################################################

##  Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
#  mod_rewrite in use

RewriteEngine On

########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
## Deny access to extension XML files (uncomment out to activate)
#<Files ~ "\.xml$">
#Order allow,deny
#Deny from all
#Satisfy all
#</Files>
## End of deny access to extension XML files
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits

#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update Your Joomla! Directory (just / for root)

# RewriteBase /


########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$  [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section


*

SDKiller

  • Живу я здесь
  • 2706
  • 329 / 5
  • ...ergo sum
Re: Проблема с SEF в субдомене
« Ответ #6 : 15.01.2011, 23:16:29 »
Код
Использовать mod_rewrite не работает

В сторону Апача смотри - сам модуль есть, подключён?
*

malavka

  • Осваиваюсь на форуме
  • 48
  • 1 / 0
Раскомментировал сейчас в httpd.conf строку

LoadModule rewrite_module modules/mod_rewrite.so

 следуя этой статье. Пока не помогло. Буду дальше сюда копать. DLL наверное нужен для винды.

*

SDKiller

  • Живу я здесь
  • 2706
  • 329 / 5
  • ...ergo sum
*

malavka

  • Осваиваюсь на форуме
  • 48
  • 1 / 0
Проблема решена. Причина ошибок - не работал модреврайт в апаче.

Как решить проблему (все делается в httpd.conf  апача):

1) Раскомментировать строку LoadModule rewrite_module modules/mod_rewrite.so
2) Принудительно прописать аллоуОвверрайд для доменной папки domen.ru-

Код
<Directory "D:/Server/www/domen.ru">
    AllowOverride All
</Directory>

dev.domen.ru наследует это разрешение.

3) Перегрузить апач.

Теперь все работает.

SDKiller, спасибо за советы и направление мысли.
« Последнее редактирование: 16.01.2011, 10:27:06 от malavka »
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

[Решено] Jroute не ловит view !

Автор n_drey

Ответов: 8
Просмотров: 4037
Последний ответ 19.07.2019, 04:02:49
от sesil
Появилась проблема в метрике после установки sh404SEF

Автор Виктор.П.

Ответов: 6
Просмотров: 2242
Последний ответ 22.04.2019, 18:00:22
от Виктор.П.
[РЕШЕНО]лавная не работает без /index.php

Автор lexxbry

Ответов: 1
Просмотров: 1249
Последний ответ 22.08.2018, 14:52:51
от lexxbry
Проблема с кодировкой страницы ошибки sh404SEF

Автор vlasyukvlad

Ответов: 1
Просмотров: 1143
Последний ответ 15.02.2018, 13:09:00
от capricorn
[Решено] sh404SEF Joomla 1.5.26 nginx + Apache бесконечный редирект

Автор capricorn

Ответов: 2
Просмотров: 1659
Последний ответ 11.02.2017, 21:59:50
от capricorn