| View previous topic :: View next topic |
| Author |
Message |
JWU42 n00b


Joined: 17 Aug 2002 Posts: 70 Location: Cornfields...
|
Posted: Fri Nov 21, 2003 5:46 pm Post subject: Squirrelmail installs to /var/www/localhost/cgi-bin/ ?!? |
|
|
Any idea what is wrong here
I just upgraded to Apache 1.3.29 which meant the change from /home/httpd/htdocs to /var/www/localhost/htdocs. I was able to get gallery installed OK by editing the .ebuild. I unmerged squirrelmail and emerged it and it installs to /var/www/localhost/cgi-bin/squirrelmail. I tried to edit the DocumentRoot part of the squirrelmail ebuild and then the install borks totally.
I am in need of some help - or perhaps I found a bug.
Thanks in Advance! |
|
| Back to top |
|
 |
Chris W l33t


Joined: 25 Jun 2002 Posts: 972 Location: Brisbane, Australia
|
Posted: Fri Nov 21, 2003 10:24 pm Post subject: |
|
|
That's where the ebuild is meant to install. I don't think it follows GLEP 11 particularly well, but it works in that location on the default site.
What problem are you having with squirrelmail? _________________ Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein |
|
| Back to top |
|
 |
JWU42 n00b


Joined: 17 Aug 2002 Posts: 70 Location: Cornfields...
|
Posted: Sat Nov 22, 2003 12:00 am Post subject: |
|
|
Chris,
I would have thought it would install to /var/www/localhost/htdocs/squirrelmail and not under cgi-bin. I used to access by domainname.com/squirrelmail but can't any longer since there is no squirrelmail subdir to Document Root (/var/www/localhost/htdocs)
I am hoping that made sense... |
|
| Back to top |
|
 |
Chris W l33t


Joined: 25 Jun 2002 Posts: 972 Location: Brisbane, Australia
|
Posted: Mon Nov 24, 2003 8:55 am Post subject: |
|
|
My humble apologies, you are correct.
The ebuild I read, and the install I have done, went into /var/www/localhost/htdocs/squirrelmail. This is a subdirectory under: | Code: | | HTTPD_ROOT="/var/www/localhost/htdocs/" | as hard coded in the current webapp-apache eclass. _________________ Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein |
|
| Back to top |
|
 |
JWU42 n00b


Joined: 17 Aug 2002 Posts: 70 Location: Cornfields...
|
Posted: Mon Nov 24, 2003 5:48 pm Post subject: |
|
|
I see you have HTTPD_ROOT and not the usual apache DocumentRoot in apache.conf as it is below...
| Code: | | DocumentRoot /var/www/localhost/htdocs |
The squirrelmail ebuild has the following
| Code: |
src_install() {
local DocumentRoot=${HTTPD_ROOT}
local destdir=${DocumentRoot}/${PN}
dodir ${destdir}
cp -r . ${D}/${HTTPD_ROOT}/${PN}
cd ${D}/${HTTPD_ROOT}
chown -R ${HTTPD_USER}.${HTTPD_GROUP} ${PN}/data
# Fix permissions
find ${D}${destdir} -type d | xargs chmod 755
find ${D}${destdir} -type f | xargs chmod 644
}
|
I see it points to HTTPD_ROOT and also references DocumentRoot (I am no coder - that is for certain).
EDIT: Found the /usr/portage/eclass/webapp-apache.eclass you mention and mine points to the proper location, but does have the cgi-bin as HTTPD_ROOT for cgi-apps:
| Code: |
function webapp-determine-htdocsdir ()
{
webapp-determine-installowner
# HTTPD_ROOT="`grep '^DocumentRoot' ${APACHECONF} | cut -d ' ' -f 2`"
# [ -z "${HTTPD_ROOT}" ] && HTTPD_ROOT="/home/httpd/htdocs/"
# temporary fix for webapps
HTTPD_ROOT="/var/www/localhost/htdocs/"
keepdir "$HTTPD_ROOT"
fowners "$HTTPD_USER"."$HTTPD_GROUP" "$HTTPD_ROOT"
fperms 755 "$HTTPD_ROOT"
}
function webapp-determine-cgibindir ()
{
#HTTPD_CGIBIN="`grep 'ScriptAlias /cgi-bin/' ${APACHECONF_COMMON} | cut -d ' ' -f 7`"
#[ -z "${HTTPD_CGIBIN}" ] && HTTPD_CGIBIN="/home/httpd/cgi-bin/"
# temporary fix for webapps
HTTPD_ROOT="/var/www/localhost/cgi-bin/"
}
|
|
|
| Back to top |
|
 |
Dr_Stein Guru

Joined: 21 Mar 2003 Posts: 303 Location: Mountain View, CA
|
Posted: Mon Nov 24, 2003 9:10 pm Post subject: Ugh. |
|
|
This change to /var/www/whatever has caused a big old mess for me as well.
Squirrelmail emerged itself into /var/www/localhost/cgi-bin as noted above, and unmerged the old version that I had at /home/httpd/htdocs - I wasn't quire expecting that as I have now lost all custom logos & settings. Sure, I should have backed it up first but a little warning would have been nice. =/
I am now getting 403 errors everywhere. |
|
| Back to top |
|
 |
fleed l33t


Joined: 28 Aug 2002 Posts: 756 Location: London
|
Posted: Mon Nov 24, 2003 10:08 pm Post subject: |
|
|
| I think it was quite braindead to change locations like that. /var/www might be infinitely better than /home/httpd but such a change is not done lightly. I think if an update is being performed as opposed to a new install then the location should not be changed, specially since it's not under /etc and therefore not protected. This sounds more like something Micro$oft would do... oh well, I'm holding off on updating until I have the guts to do it! |
|
| Back to top |
|
 |
Dr_Stein Guru

Joined: 21 Mar 2003 Posts: 303 Location: Mountain View, CA
|
Posted: Tue Nov 25, 2003 12:20 am Post subject: yup |
|
|
I really wish that they had made it a *choice* - like if a "vhost USE flag" was there, THEN put stuff in /var/www/localhost. I *like* stuff in /home for a few reasons. This change has made a huge mess of things. >
Oh well.. things will be slow around this holiday weekend. I can patch things up.  |
|
| Back to top |
|
 |
JWU42 n00b


Joined: 17 Aug 2002 Posts: 70 Location: Cornfields...
|
Posted: Tue Nov 25, 2003 3:08 am Post subject: |
|
|
Well - misery loves company as they say...
I am glad to hear it isn't just me. Now to figure why some people have been able to install properly under htdocs instead of cgi-bin (this all under/var/www/localhost)
Are we all using squirrelmail-1.4.2-r1 ??? |
|
| Back to top |
|
 |
Dr_Stein Guru

Joined: 21 Mar 2003 Posts: 303 Location: Mountain View, CA
|
Posted: Tue Nov 25, 2003 6:40 am Post subject: Miserable? |
|
|
Yup, we are. I managed to fix mine after a lot of directory movin' & doc readin' and 5 cans of Vanilla Coke.
Oh, if you use the SSL plugin for Squirrelmail, your SSL setup gets hosed by this change as it leaves the ssl.default-vhost.conf set to the (now) OLD $HTTPD_ROOT
Overall it didn't take me that long to get everything back up and running but it was ever so slightly irritating. I don't use any "web apps" on this particular server, unless Squirrelmail is now considered a "web app." |
|
| Back to top |
|
 |
tecknojunky Veteran


Joined: 19 Oct 2002 Posts: 1937 Location: Montréal
|
Posted: Sat Dec 20, 2003 7:04 pm Post subject: |
|
|
| fleed wrote: | | I think it was quite braindead to change locations like that. |
Agreed.
How about giving the users the choice to where the document root should be. That would solve any issues with any web server related ebuilds. _________________ (7 of 9) Installing star-trek/species-8.4.7.2::talax. |
|
| Back to top |
|
 |
reinier n00b


Joined: 30 Jan 2004 Posts: 12 Location: Netherlands
|
Posted: Fri Jan 30, 2004 2:41 am Post subject: |
|
|
I have installed Apache/1.3.29 with PHP/4.3.4 and although my emerge (squirrelmail-1.4.2-r1) did install to /var/www/localhost/htdocs/squirrelmail I have another problem. My webserver directory is /home/user/www/ but when I link to http://localhost/squirrelmail/ I get an HTTP404. I don't understand how http://localhost/squirrelmail/ could actually work (no symbolic links as far as I can tell) and I'm wondering how Dr_Stein moved his directories to get everything to work..? I'm not using SSL (yet), any help would be greatly appreciated ... I just want to get it working!
btw, in an insane attempt I made a new directory named 'www' in /var/www/localhost/ and copied everything from 'htdocs' to the new directory... but to no avail  |
|
| Back to top |
|
 |
Oopsz Guru

Joined: 08 Oct 2002 Posts: 340
|
|
| Back to top |
|
 |
reinier n00b


Joined: 30 Jan 2004 Posts: 12 Location: Netherlands
|
Posted: Fri Jan 30, 2004 10:55 am Post subject: |
|
|
Oopsz, your solution sounds interesting... How would I go about symlinking? I've done some fooling around with 'ln' but I'm not quite sure how to link directories and I don't understand the Squirrelmail setup well enough to know what to link. Could you please give some syntax? As I mentioned before, my webserver directory is /home/user/www/ and technically I want to get http://localhost/squirrelmail/ to work... Thanks in advance  |
|
| Back to top |
|
 |
D-brane n00b

Joined: 20 Nov 2002 Posts: 9 Location: Netherlands
|
Posted: Sat Jan 31, 2004 3:06 pm Post subject: |
|
|
| reinier wrote: | Could you please give some syntax? As I mentioned before, my webserver directory is /home/user/www/ and technically I want to get http://localhost/squirrelmail/ to work... Thanks in advance  |
| Code: | | ln -s /var/www/localhost/htdocs/squirrelmail/ /home/user/www/squirrelmail |
|
|
| Back to top |
|
 |
bcressey n00b

Joined: 13 Jun 2002 Posts: 35
|
Posted: Sat Jan 31, 2004 4:30 pm Post subject: |
|
|
| reinier wrote: | | Oopsz, your solution sounds interesting... How would I go about symlinking? |
If you want the old behavior of /home/httpd instead of /var/www, simply do:
ln -s /home/httpd /var/www
and you're basically set. I did this for a long time the other way around, to get everything under /var/www before this change was made. |
|
| Back to top |
|
 |
reinier n00b


Joined: 30 Jan 2004 Posts: 12 Location: Netherlands
|
Posted: Sat Jan 31, 2004 10:07 pm Post subject: |
|
|
Thanks, I had tried linking directories "ln -d" which didn't work. Also, I made an attempt at changing the ebuild unmerging and re-emerging squirrelmail. That didn't work either but when I used the symbolic link parameter everything fell into place  |
|
| Back to top |
|
 |
|