Trying to make it so can turn clean-urls back on.
Command Not Found when try a2enmod rewrite because this command does not exist in CentOs.
However if I command httpd -M in Centos it lists rewrite module declaring it shared.
So then went ahead and edited the httpd.conf file located in /etc/httpd/conf/httpd.conf
where changed none to all at:
Directory />
Options FollowSymLinks
AllowOverride ALL
and a little further down:
RewriteEngine on
RewriteBase /drupal
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Then after restart :
Starting httpd: httpd: Syntax error on line 354 of /etc/httpd/conf/httpd.conf: without matching section
[FAILED]
I have not attempted to switch clean-urls back on in admin because I know it will cause pages not found again so they remain disabled.
Comments
=-=
a syntax error indicates a typo somewhere in the file that occurred when you made changes to it.
you didn't need to add step 3 from http://drupal.org/getting-started/clean-urls to httpd.conf if all instances of none were changed to all as indicated by the note
http://dev.antoinesolutions.com/apache-server/mod_rewrite should aid for centos/drupal specific config
have read that many times
Problem with that is it talks about www or no www but I am only concerned with subdomain.
Also I like not editing default explanatory httpd.conf file and instead adding my changes to my own named.conf file.
In /etc/httpd/conf.d I have name of my drupal folder eg myname.conf and within that have servername and virtualhosts added
so I need to know if I should just add to that too for rewrite rules. in other words..
shouldn't I add the ALL declaration to that file and leave default file untouched?
and will that ALL declare be enough so I can re-enable clean-urls?
=-=
www or no www if it doesn't apply to you, don't use it.
as stated in the note, if you don't add the rewrites to the .conf file then apache will use drupal's .htaccess
why then
is it listening to virtualhosts in mynamed.conf file in /etc/httpd/conf.d/ when I have not named them in either default conf file or .htaccess?
mynamed.conf must over ride.
Too Confusing
I'm sick of this now. I will have to remain with no clean urls.
There are too many combinations for error.
The settings.php file
the conf file
the.htaccess file
the httpd.conf default file
I have tried many combinations for rewritebase and I can see mod-rewrite is enabled in php.
I am confused now because NOTHING works.
if .htaccess is in my subdomain folder then do i go rewritebase / or rewritebase /mydrupafoldername
do I do it for both rewritebase rules in .htaccess?
It was hard enough getting subdomain to point to www/html/subfolder and main url to /www/html
in the settings .php without making apache fail on restart.
Now this crap- excuse my language but I'm fed up with it now. It is a huge time waster for something which should be so simple.
=-=
if the subdomain is set up properly not sure why you need a rewrite base.
not sure what you are doing with settings.php, as above you don't need to set $base_url if you're mapped correctly in apache
core .htaccess file shouldn't need to be altered if using httpd.conf
using a subdomain isn't the same as using a subfolder because apache is mapping the subdomain to the folder.
I'd reverse all changes you made and begin again utilizing only httpd.conf
my initial guess is that you missed changing an AllowOverride None to AllowOverride All in httpd.conf but without seeing pastebins of your files it's a blind guess.
Created some images of files to demonstrate edits
Red indicates what has been added to file and the purple is the directory of file edited.
settings.php
mynamed.conf
httpd.conf
.htaccess
works now
I was able to enable clean -urls with above exact settings only after I deleted .httpd.conf.copy