From: Maks Re <admaks@gmail.com> To: ALT Linux sysadmin discuss <sysadmins@lists.altlinux.org> Subject: [Sysadmins] drupal + apache-1.3.41rusPL30 + ... Date: Wed, 12 Aug 2009 20:04:38 +0400 Message-ID: <20090812200438.10ef7ddc@lynx> (raw) Привет. подскажите, может я что делаю не так, или не понимаю... есть контейнер. установил apache 1.3.. + php5 + mysql... включил модуль mod_rewrite (rewriteengine + rewriterule...) сначала не понимал что да как, искал ответы в рассылке... нашел что еще надо апачу рассказать AllowOverride... рассказал в /etc/httpd/conf/vhosts/Vhosts.conf <Directory "/var/www/vhosts/"> # AllowOverride Options FileInfo AllowOverride All </Directory> все еще что ты было не так (апач отдавал ошибку 500) стал копаться, и оказалось, что апач как-то отрабатывает дефолтный .htaccess Drupal`а (прилагаю)... после выключения блока, где уточняются настройки php5 - заработало. Вопрос - уточняющие настройки в .htaccess для php5 нужны? или они как то не так определены? или их надо определять как-то по другому? спасибо .htaccess ++++++++++++++++++++ # # Настройки Apache/PHP/Drupal: # # Защита файлов и директорий от пытливых глаз. <FilesMatch "(\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)|code-style\.pl|Entries.*|Repository|Root|Tag|Template)$"> Order allow,deny </FilesMatch> # Не показывать листинги директорий в которых нет индексного файла. Options -Indexes # Follow symbolic links in this directory. Options +FollowSymLinks # Адрес документа при ошибке 404. ErrorDocument 404 /index.php # Индексный файл. DirectoryIndex index.php # Override PHP settings. More in sites/default/settings.php # but the following cannot be changed at runtime. # PHP 4, Apache 1. <IfModule mod_php4.c> php_value magic_quotes_gpc 0 php_value register_globals 0 php_value session.auto_start 0 php_value mbstring.http_input pass php_value mbstring.http_output pass php_value mbstring.encoding_translation 0 </IfModule> # PHP 4, Apache 2. <IfModule sapi_apache2.c> php_value magic_quotes_gpc 0 php_value register_globals 0 php_value session.auto_start 0 php_value mbstring.http_input pass php_value mbstring.http_output pass php_value mbstring.encoding_translation 0 </IfModule> # PHP 5, Apache 1 and 2. <IfModule mod_php5.c> php_value magic_quotes_gpc 0 php_value register_globals 0 php_value session.auto_start 0 php_value mbstring.http_input pass php_value mbstring.http_output pass php_value mbstring.encoding_translation 0 </IfModule> # Requires mod_expires to be enabled. <IfModule mod_expires.c> # Enable expirations. ExpiresActive On # Cache all files for 2 weeks after access (A). ExpiresDefault A1209600 # Do not cache dynamically generated pages. ExpiresByType text/html A1 </IfModule> # Various rewrite rules. <IfModule mod_rewrite.c> RewriteEngine on # Если вы хотите чтобы ваш сайт был доступен как с префиксом «www», так и без него, # вы можете использовать следующие настройки для перенаправления посетителей на предпочитаемый вами URL, # как С так и БЕЗ префикса «www». Выберите ТОЛЬКО одну настройку: # # Для перенаправления всех посетителей сайта на адрес С префиксом «www» # (http://example.com/… будет перенаправлен на http://www.example.com/…) # измените и расскоментируйте следующие строчки: # RewriteCond %{HTTP_HOST} ^example\.com$ [NC] # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] # # Для перенаправления всех посетителей сайта на адрес БЕЗ префикса «www» # (http://www.example.com/… будет перенаправлен на http://example.com/…) # измените и расскоментируйте следующие строчки: # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC] # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] # Измените и расскоментируйте RewriteBase если вы установили Drupal в поддирекорию #RewriteBase /drupal # Rewrite old-style URLs of the form 'node.php?id=x'. #RewriteCond %{REQUEST_FILENAME} !-f #RewriteCond %{REQUEST_FILENAME} !-d #RewriteCond %{QUERY_STRING} ^id=([^&]+)$ #RewriteRule node.php index.php?q=node/view/%1 [L] # Rewrite old-style URLs of the form 'module.php?mod=x'. #RewriteCond %{REQUEST_FILENAME} !-f #RewriteCond %{REQUEST_FILENAME} !-d #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$ #RewriteRule module.php index.php?q=%1 [L] # Rewrite current-style URLs of the form 'index.php?q=x'. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] </IfModule> ++++++++++++++++++++++++++++++++++++++++++++++
next reply other threads:[~2009-08-12 16:04 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-08-12 16:04 Maks Re [this message] 2009-08-12 17:26 ` Yuriy Kashirin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20090812200438.10ef7ddc@lynx \ --to=admaks@gmail.com \ --cc=sysadmins@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux sysadmins discussion This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \ sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com public-inbox-index sysadmins Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.sysadmins AGPL code for this site: git clone https://public-inbox.org/public-inbox.git