On Tue, 2010-03-23 at 12:38 -0700, Justin wrote:
My symbolic link:
My testapp1 folder:
My /public folder (no .htaccess file):
drwxrwxrwx 2 root www-data 4096 2010-03-20 08:02 javascripts
sbin/apache2 -k start
www-data 14188 0.0 0.2 141016 4692 ? S 12:25 0:00 /usr/
<Directory /home/justinschier/www/testapp1/public>
Allow from all
Options -MultiViews
</Directory>
Man, I am so out of ideas. Anything else you can think of for me to
try?
Thanks again SOOO much. If you have an Amazon wish list, I’m totally
buying you something.
log files are written by rails as the ‘user’, not by the apache user.
See the directory listing of my ‘logs’ below.
Apache user is www-user anyway, not root. Root user is only for the
master process.
you should change the ownership back on all files/folders
in /home/justinscheier/www/testapp1
Then, you need to indicate in your apache configuration which RailsEnv
is to be used…
<VirtualHost *:80>
ServerName testapp1.fuse.sonikserver.com
DocumentRoot /home/justinschier/www/testapp1/public
note the following line
RailsEnv production # or development if that's what you are running
<Directory /home/justinschier/www/testapp1/public>
Allow from all
Options -MultiViews
</Directory>
Passenger is very clever and can be forced to restart just by issuing
the command (as user), ‘touch tmp/restart.txt’
On my setups (RH/CentOS/Fedora), apache is both user and group and
apache web server runs as user:group apache:apache
thus…
drwxrwxr-x 3 craig apache 4096 2010-03-21 03:17 log
drwxrwxr-x 7 craig apache 4096 2010-03-06 01:23 tmp
note: apache group on both folders and group permissions are rwx (or
chmod 775 log tmp)
also, inside tmp…
$ ls -l tmp/
total 16
drwxrwxr-x 3 craig apache 4096 2010-02-09 02:58 cache
drwxrwxr-x 3 craig apache 4096 2010-02-09 02:58 pids
-rw-rw-r-- 1 craig craig 0 2010-03-23 00:12 restart.txt
drwxrwxr-x 3 craig apache 4096 2010-02-09 02:58 sessions
drwxrwxr-x 3 craig apache 4096 2010-02-09 02:58 sockets
the only places you should even think about changing ownership (log &
tmp) and even then, just the group bits, not the user.
root is used nowhere.
The other thing you have to make certain of, is that if you are running
apache from your home directory, that the apache user (in your case,
www-data) can actually access.
so ls -ld /home /home/justinscheier /home/justinscheier/www
/home/justinscheier/www/testapp1 must all be ‘o+x’ so the web server
user can access.
** log files (with logrotate handling weekly rotation, development log
only updates when I run script/console)
$ ls -l log
total 23932
-rw-r–r-- 1 craig craig 9546293 2010-03-19 22:29 development.log
-rw-r–r-- 1 craig craig 1052394 2010-03-23 20:07 production.log
-rw-r–r-- 1 craig craig 4943853 2010-02-28 03:21
production.log-20100228
-rw-r–r-- 1 craig craig 2694898 2010-03-07 03:38
production.log-20100307
-rw-r–r-- 1 craig craig 2908919 2010-03-14 03:33
production.log-20100314
-rw-r–r-- 1 craig craig 3306385 2010-03-21 03:17
production.log-20100321
Craig
–
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.