I heard somewhere that, if you place a php.ini in a website root or subdirectory it will basically use default settings for everything that is not included in this php.ini file. So if you have changed any default in your main php.ini file (highly likely) then your changes will be ignored if you put a php.ini file in web root or below it. Can anyone confirm this?
Owen's questions
I have a VPS and want to used a forward proxy set-up so that I can appear to be browsing from my VPS IP address rather than my client address. If I set up a proxy directive in httpd.config like this:
<IfModule proxy_module>
<IfModule proxy_http_module>
ProxyRequests On
ProxyVia On
<Proxy *>
Order Deny,Allow
Deny from all
Allow from (**client ip address**)
</Proxy>
</IfModule>
</IfModule>
... I think this will only allow my client ip address to use the proxy BUT will also prevent the rest of the world accessing web pages from my server.
Is there a way of putting all this into a virtualhost or .htaccess directive so that the proxy only 'kicks in' when accessed through a specific URL?
I have a working installation of apache and mysql using standard ports, and my host file points domains to 127.0.0.1.
I'm in the process of switching my LAMP stack to Zend Server but want my old set up working simultaneously.
I tried switching the old apache port to 8080, and a different port for the old mysql. This seems to work OK (apache is working, mysql is listening on the new port but I've not tried a database connection).
However my problem is that I can't map domains to 8080 on localhost because host file doesn't handle ports, just IP address.
I should mention that I'm on a Windows machine.
Any ideas how I would solve this so I can use hosts file to map domains to 2 different LAMP stacks?
Edit
Regarding hosts file and virtualhost - When I go to localhost I get my new Zend apache running, when I go to localhost:8080 I have my old apache document root. This is as expected.
However I can't get hosts file and virtual hosts working on :8080. In my host file I have
127.0.0.1 example.dev:8080
and in my virtualhosts (httpd-vhosts.conf on my old apache instance, not my Zend instance) I have
NameVirtualHost *:8080
<VirtualHost *:8080>
DocumentRoot "C:/xampp/htdocs"
</VirtualHost>
<VirtualHost *:8080>
DocumentRoot "C:\xampp\htdocs\example.dev"
ServerName example.dev
</VirtualHost>
Now when I try example.dev in my browser I get 'server not found' so I think that the virtualhosts did not work.
I added a user for the sole purpose of using SU for root. I did not allow the creation of a home directory when creating the user. So now when I login as this user I get the following:
Could not chdir to home directory /home/MYUSERNAME: No such file or directory
Couldn't resolve homedir for current user at - line 0
BEGIN failed--compilation aborted.
Couldn't resolve homedir for current user at - line 0
BEGIN failed--compilation aborted.
Is this an error, and if so how do I fix it so it is not looking to "resolve" the homedir?
Our VPS is set up in such a way that all databases are accessible from any domain via localhost and the username/password/dbname.
Is this the usual set up, or should there be some way of 'jailing' each user so they cannot access other databases on localhost?
Thanks, Mark
In Linux/Apache does a subdomain have all the functionality of a normal domain?
For instance, can I have a www address, https address, and can I have email? Eg,
http://www.mysubdomain.mydomain.com and
https://www.mysubdomain.mydomain.com
http://mysubdomain.mydomain.com and
https://mysubdomain.mydomain.com
and,
[email protected]
Is this possible/practical?
Thanks,
My client uses a 3rd party to stream their radio station. Recently then have complaints about service outage in different global locations.
Does anyone know of a service I can use to monitor the remote audio stream coming from the streaming server?
Anyone know where a windows dll for PECL OAUTH-1.0.0?
(0.99.9 is here http://downloads.php.net/pierre/)
I'm on Windows using XAMPP and have Mercury Mail set up working fine for local mail. To get this working I need to use addresses such as, user@localhost
But it's a pain when I use email address validation in my scripts that require a properly formed email address, ie, with a domain extension like .com, .net, .co.uk etc on the end.
If I set up an address like [email protected], or even [email protected], is there a place (ini, conf, hosts file or similar) where I can get this to 'map' to user@localhost?
I have a VPS that's hosting half a dozen PHP-based sites. All is OK on php5.2.10 but I want to upgrade to 5.3.3.
I have tested the functionality of the sites on my local dev machine running 5.3.1 and all is well.
Having never done a PHP upgrade, and not wanting to disrupt the service of the live sites, are there any precautions you can give me that I should be considereing before I do this?
Thanks.
I want to allow anyone access to SSH with a valid identity key BUT allow only one IP address to have SSH password access.
How do I do this?
(I'm running on Centos 5.5)
I want to upgrade to PHP 5.3.3 but I believe Zend Optimizer is not available yet for this version of PHP.
I currently have Zend Optimizer on PHP 5.2.10 but I'm not sure if I'll miss it or not?
Can someone tell me what the benefits of Zend Optimizer are and if they are worth staying on PHP 5.2.10 for?
I run a webserver on a VPS. For security I would like to change the default linux root username to something else. How do I do this and are there any implications I should consider before doing this?
In my csf.allow file I have (something like):
98.765.43.21
tcp:in:d=20:s=12.345.67.89
tcp:in:d=21:s=12.345.67.89
Am I right in thinking that this will 1) always allow any service for 98.765.43.21 2) deny incoming FTP connections on tcp ports for all IPs except 12.345.67.89 ?
The first IP (98.765.43.21) does not seem to deny anything, while the second two definitions seems to deny all other IPs from accessing those specified services. Is this correct?
I recently had an FTP attack where 3 files were copied into public HTML directory of my domain. (It looks like the FTP password was compromised, but I'm still investigating this.) The strange thing is that the FTP log documented 5 separate IP addresses that were involved in the same attack. I checked the IPs shown in the log extract below. According to http://www.all-nettools.com/toolbox/smart-whois.php the IPs originate in Austria, Poland, Brazil, Israel and Sweden.
The 3 offending files are "mickey66.html", "mickey66.jpg", and "canopy37.html", - theyand you can see them in the log extra...
2010-06-17T21:24:02.073070+01:00 webserver pure-ftpd: ([email protected]) [INFO] kingdom is now logged in
2010-06-17T21:24:06.632472+01:00 webserver pure-ftpd: ([email protected]) [INFO] kingdom is now logged in
2010-06-17T21:24:07.216924+01:00 webserver pure-ftpd: ([email protected]) [NOTICE] /home/kingdom//public_html/mickey66.html uploaded (80 bytes, 0.26KB/sec)
2010-06-17T21:24:07.364313+01:00 webserver pure-ftpd: ([email protected]) [INFO] Logout.
2010-06-17T21:24:08.711231+01:00 webserver pure-ftpd: ([email protected]) [INFO] kingdom is now logged in
2010-06-17T21:24:10.720315+01:00 webserver pure-ftpd: ([email protected]) [NOTICE] /home/kingdom//public_html/mickey66.jpg uploaded (40835 bytes, 35.90KB/sec)
2010-06-17T21:24:10.848782+01:00 webserver pure-ftpd: ([email protected]) [INFO] Logout.
2010-06-17T21:24:18.528074+01:00 webserver pure-ftpd: ([email protected]) [INFO] Logout.
2010-06-17T21:24:22.023673+01:00 webserver pure-ftpd: ([email protected]) [INFO] kingdom is now logged in
2010-06-17T21:24:23.470817+01:00 webserver pure-ftpd: ([email protected]) [NOTICE] /home/kingdom//public_html/mickey66.html uploaded (80 bytes, 0.38KB/sec)
2010-06-17T21:24:23.655023+01:00 webserver pure-ftpd: ([email protected]) [INFO] Logout.
2010-06-17T21:24:26.249887+01:00 webserver pure-ftpd: ([email protected]) [INFO] kingdom is now logged in
2010-06-17T21:24:28.461310+01:00 webserver pure-ftpd: ([email protected]) [NOTICE] /home/kingdom//public_html/canopy37.html uploaded (80 bytes, 0.26KB/sec)
2010-06-17T21:24:28.760513+01:00 webserver pure-ftpd: ([email protected]) [INFO] Logout.
I don't know what user is represented by the query sign (?), is this 'root'. Anyway can anyone shed any light on all this?