I installed lsws without apache conf file(httpd.conf). Then I created a new virtual host in "suEXEC" Template. I added a new user via SSH and made home dir for him and chowned his home dir + all his files to hisusername:hisusername. His home dir(/home/user/) is chmoded to 755 and his /public_html to 711. It worked fine but after that I installed phpbb3 forum and when I tried to chmod config.php to 600 I got an error on the forum:
Fatal error: require() [function.require]: Failed opening required './config.php' (include_path='.:/usr/local/lib/php') in /home/username/public_html/common.php on line 127
When I was using lsws with apache conf file and I had configured suEXEC + suPHP for apache I was able to chmod config file to 600 and it worked fine. I have no idea what could be the problem now.
It works fine when I chmod config.php to 755 but for security reasons I would need a way to configure it to 600. LiteSpeed si running as nobody:nobody. EX. APP settings: LSAPI App $VH_NAME_lsphp uds://tmp/lshttpd/$VH_NAME_lsphp.sock
I have Fedora Core 5 wih Apache 2.2.2 and VirtualHosts setup, currently running mod_php and mod_suexec. I would like to switch to use php with suexec because I need to edit files with php that "nobody" doesn't have access to (777 not an option).
Right now mod_suexec works great with Perl, but not PHP. So I ask, how can I get them to play nice?
I've been attempting to develope a server running apache 2+, php 5, and I was running into issues installing php as cgi.... All my scripts require The shebang: #!/usr/bin/php at the top to execute properly. Anyone know a good site/how to that explains how to do this?
has anyone else here run suexec with apache? If so, could you tell me what you compiled it with? Just curious, as I think i'm doing everything right, yet I still fail
make install To solve the errors during configure problems take a look at this: [url]
Next you'll need to download/install fcgid:
Code: wget http://www.fastcgi.com/dist/fcgi-2.4.1-SNAP-0311112127.tar.gz tar xfvz fcgi-2.4.1-SNAP-0311112127.tar.gz cd fcgi-2.4.1-SNAP-0311112127 ./configure make make install Next you'll need to compile/install mod_fastcgi for Apache 2.2.2:
Code: wget [url] tar xfvz mod_fastcgi-SNAP-0404142202.tar.gz cd fcgi-2.4.1-SNAP-0311112127 Now we need to apply a patch so mod_fastcgi compiles with Apache 2.2. Put the following into a file:
arr->elts = new_elts; diff -ruN mod_fastcgi-2.4.2/fcgi_config.c mod_fastcgi-2.4.2.for22/fcgi_config.c --- mod_fastcgi-2.4.2/fcgi_config.cThu Oct 30 02:08:34 2003 +++ mod_fastcgi-2.4.2.for22/fcgi_config.cMon Dec 5 12:59:01 2005 @@ -50,7 +50,7 @@ /* Convert port number */ tmp = (u_short) strtol(portStr, &cvptr, 10); if (*cvptr != '' || tmp <1> USHRT_MAX) - return ap_pstrcat(p, "bad port number "", portStr, """, NULL); + return apr_pstrcat(p, "bad port number "", portStr, """, NULL);
*port = (unsigned short) tmp;
@@ -75,11 +75,11 @@ tmp = strtol(txt, &ptr, 10);
if (*ptr != '') { - return ap_pstrcat(p, """, txt, "" must be a positive integer", NULL); + return apr_pstrcat(p, """, txt, "" must be a positive integer", NULL); }
if (tmp <min> USHRT_MAX) { - return ap_psprintf(p, ""%u" must be >= %u and <u>= %u and <u cp=''>= %d", *num, min); + return apr_psprintf(p, ""%d" must be >= %d", *num, min); }
if (*ptr != '') - return ap_pstrcat(p, """, val, "" must be a positive integer", NULL); + return apr_pstrcat(p, """, val, "" must be a positive integer", NULL); else if (*num < min) - return ap_psprintf(p, ""%u" must be >= %u", *num, min); + return apr_psprintf(p, ""%u" must be >= %u", *num, min); return NULL; }
if (*ptr != '') - return ap_pstrcat(p, """, val, "" is not a floating point number", NULL); + return apr_pstrcat(p, """, val, "" is not a floating point number", NULL); if (*num <min> max) - return ap_psprintf(p, ""%f" is not between %f and %f", *num, min, max); + return apr_psprintf(p, ""%f" is not between %f and %f", *num, min, max); return NULL;
Apache Suexec, so that each VHosts runs under there own username FTP for each of the vhosts.
I have made a username aplushost and FTP works fine when i login, however when i try and get Suexec to work it shows a 403 permision dined, even know the whole directroy path is with correct permsions.
"/home/aplushost/www"
However if i chown the directroy "aplushost" to apaches username , currently "nobody" i have tried with "apache" and many others the page is displayed correctly.
The weird thing is that the www directroy can still be set to the aplushost username and files work inside.
However due to changing the privalages of the folder aplushost ftp now fails to login due to the folder not being owned by the ftp user "aplushost".
So im stuck between only having one item working at a time.
i have put some content of my config files.
----------httpd.conf vhosts------------------ <VirtualHost 87.117.196.247> DocumentRoot "/home/aplushost/www" ServerName aplushost.co.uk SuexecUserGroup aplushost aplushost <Directory "/home/aplushost/www"> allow from all Options +Indexes </Directory> </VirtualHost>
I have built a new website (ASP) for a friend. Their current domain "hissite.co.uk" is on another server - they want their email to stay with that hosting company.
I have created their new site on another server using a similar domain name "hissite2.co.uk". The server is a shared hosting account so the IP isn't dedicated.
Question
Making a change to the A Record asks for an IP address but doesn't work when pointing to a shared hosting server which holds lots of domains. I don't want to change the CName or set up a 301 Redirect.
I was told that if I add an alias of the main domain (hissite.co.uk) on the new server the change to the A record on the current server, although the IP address is pointing to a shared hosting server will work.
Alias /icons/ "/var/www/icons/" <Directory "/var/www/icons"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all </Directory>
Recently I have tried to add custom alias /volano/
Quote:
Alias /volano/ "/home/volano/vcclient/"
When I go to mysite.com/volano/ i get Forbidden error (error 403).
I am having trouble with blank pages on some web applications; ccHost and phpBB3.
I can get these to run on a seperate VPS, that isn't as securely locked down and the dedi --- but it is of course the dedi I want to run these apps from.
I simply get blank pages when trying to access ccHost. As if PHP isn't parsing it. But in a phpBB3 installation I'm getting random blanks, some of which I can refresh out of ... What's even weirder: sometimes when I try to viewtopic - or call some function ... I get the download dialogue!? (Do you want to open or download index.php for instance).
I've been trying loads of stuff. It seems that mod_security isn't running anymore, so that isn't the issue. Could mod_cgi or mod_suexec perhaps be the cheeky offenders? I have absolutely no idea.
Just hoping someone can help me where to look... Or how I can debug this issue. I'm at a loss in how to continue. Any help will be very appreciated.
Some details... The server is hardened and secured, but... I'm running other CMS installs on the server, and they are working fine. Even a phpBB2 install is running smooth. Besides this I'm using LAMP setup on CentOS and webmin is running.
I need to be able to access cgi between vhost domains. In particular one frequently updated file located 'centrally' in the cgi-bin of one of the vhost domain.
I would like to be able to have other vhost domains be able to access this file but suexec won't let that happen. I have searched around and tried to following;
Created vhost.conf file in the conf directory of one of the domains.
The result was the same, all vhosts stopped working.
Does anyone have an idea how I can achieve this? I know I can disable suexec all together but that wreaked a little havoc with the cgi app when I tried that.
I've a VPS with Plesk. I have a website running a website and I've got a second domain.
I wish to setup second domain and forward it to first domain. I've used doamin alias page. However when I call second URL it's displaying a default plesk page instant of my first URL.
I have a VPS (vps.example.com) setup with few sub accounts set-up. All sub accounts can send emails using specified domain, however email header will always display my VPS's name.
for example:
"from localhost ([127.0.0.1] helo=example.NET) by vps.example.com" Is it possible to set it up so every account has it's own server name for example: smtp.example.net mail.example.org or vps.domain.com
Platform: Cent OS panels:VZPP, WHM, cPanel IP: total of 3, 2 used for name servers, can purchase more if needed. Access: root level access.
Apache is currently working fine using an alias for one webserver, weewx. I had a heck of a time configuring the alias though, most configurations would result in a 404 error.
I'm trying to get it working with another webserver, IOG. And I'm again getting 404 errors...
Currently my IOG.conf file looks like this:
Code: Alias /IOG /home/Storage/iog <Directory /home/Storage/iog> Options Indexes AllowOverride None Require all granted </Directory>
/home/Storage/iog is good, it's the exact path and is readable/writable by all users.
Options Indexes is included because IOG does not generate an index.html.
AllowOverride None is included because I'm not using .htaccess files, and because it worked for the weewx configuration file.
Require all granted is used because I'm not serving this external to my LAN and would like all LAN machines to have access.
My (working) weewx configuration file:
Code: Alias /weewx/ "/home/Storage/weewx/" <Directory "/home/Storage/weewx/"> Options Indexes Includes FollowSymlinks AllowOverride None Require all granted </Directory>
Of course I tried that first, modifying the paths to IOG, and got a 404 error.
I make sure to reload Apache each time I make a change to the configuration file.