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 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'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 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 need to change the server configuration on Plesk such that the SuexecUserGroup directive is removed, so the user's cgi scripts run as the apache user (www-data), rather than as the user specified in that directive (the domain user), as on an unshared (non-VPS) server. I don't care about security from other domains because only one domain runs on it anyway, so making the user domain-specific is irrelevant from a security point of view and stops some of the user's code working.
This directive is found in /var/www/vhosts/domainname.com/conf/httpd.include and is: SuexecUserGroup user psacln (this line appears twice, for ports 443 and 80)
I understand that this file can't be modified, as it may be overwritten by Plesk. Therefore additional directives must go in the vhost.conf file.
Will the following vhost.conf file do the trick and override the directives in httpd.include?
1. Point me to an article you can validate as being accurate; or
2. Explain to me as much as you are willing to the following question:
How would someone setup a CDN to compete with companies like level3/softlayer/peer1 etc..? What kind of software is used? Is there special routing issues to address? I do understand you need *at least* 15-20 nodes before you can offer a "true CDN" and I do understand that they need to be in different locations on the POP's. How do you stream files over the CDN as well? Via RTMP?
to add a new domain name to my hosting account, when I put in the nameservers at namecheap, my new domain resolves to the wrong IP address.
When I contacted my host, they told me I need to contact namecheap and give them the IP address and my namservers names.
I have never had to do this before. Usually I just add a new domain in my WHM and everything works. Right now namecheap is using my hosting companies nameservers, when I try to switch to my name servers namecheap comes back with an error.
I added new zones in the WHM for my name servers, but nothing is working.
What do I need to do to get this working? I have one current domain name that is working and one that is not.
I have already one dedicated server which I use for shared hosting and for my companys site.
I have read something little about managing VPS and can say that I want to use OpenVZ for that but that's all of my knowledge.
1. Howto setup VPS box (openVZ)?
2. Do I need leave free space/resource for "management" or can I use all space/resource for clients. I have my companys site and stuff in different server (as you can read above).
3. VPS box security? Do I need to worrie about that?
4. If I want to offer multiple OS options for clients, is it possible and how that is done?
5. Is there any "VPS control panel" for clients? For reboot, shutdown, re-install OS and such actions?
I have a dedicated server (windows 2003) with FDC i am new to all this so i need some help trying to set up a ftp so i can conect to the server, how do i go about this? are there any tutorials on this? i have looked on google but no luck. Also i am in spain so is it possible to use the server as a proxy server so i can connect with my computer in Spain to the internet with a US IP?