我只是设置VPS来运行Apache的php5-fpm,它被设置为以user:user身份运行每个用户池。 原因很简单,就是允许用户真正拥有自己的文件,而不是由www-data拥有自己的文件。 这些内容不能被这些用户改变/删除。 php5-fpm似乎为我解决了这个问题。 如果有的话,这种设置的安全含义是什么?
使用centos OS和apache 2.2.3 我的PHP代码不是通过SSL解释的。 它呈现出浏览器中的代码。 网页在http下工作正常。 组态: <VirtualHost secure.cognitionsmartsites.com:443> AddType text/html .php AddHandler application/x-httpd-php .php ServerName secure.cognitionsmartsites.com <Directory "/var/www/vhosts/default/htdocs"> Allow from all Options +Indexes </Directory> IndexOptions ServerAlias secure.cognitionsmartsites.com DocumentRoot /var/www/vhosts/default/htdocs SSLEngine On SSLCertificateFile /usr/local/psa/var/certificates/cert.crt SSLCertificateKeyFile /usr/local/psa/var/certificates/private.key SSLCertificateChainFile /usr/local/psa/var/certificates/intermediate.crt </VirtualHost> httpd -S输出 VirtualHost configuration: 192.168.0.1:80 siteeditor.vserver.onlinehome-server.info (/etc/httpd/conf.d/zz011_siteeditor.conf:8) 127.0.0.1:80 siteeditor.vserver.onlinehome-server.info (/etc/httpd/conf.d/zz011_siteeditor.conf:8) 74.208.101.55:80 default (/etc/httpd/conf.d/zz010_psa_httpd.conf:48) 74.208.101.55:443 secure.cognitionsmartsites.com (/etc/httpd/conf.d/smartsitessl.conf:3) […]
我可以很容易地改变和定制每个域的所有php.ini-s,但是,我不知道如何定制核心的一个? 我想能够限制全局的一些设置,但我不知道哪个php.ini是核心的一个?
我有一个PHP脚本,说file.php包含: <?php exec("ip netns exec vpn file2.php"); ?> 如果我通过命令行运行file.php,以root身份运行。 但是,当我通过Apache运行它时,www-data不具有使用ip netns exec的权限,但www-data可以使用ip netns list。 我如何或者)让ip netns执行由非root用户运行,或给www-data运行ip net执行的东西的权限?
我已经安装了APC,但是我并没有像预期的那样对性能产生巨大的影响。 其实,我不确定我是否观察到任何好处,但也许只是因为与执行我自己的代码相比,花在解释php代码上的CPU时间可以忽略不计。 所以我想知道:这可能是因为我运行PHP作为一个Apache模块(而不是fastcgi)和/或因为PHP使用prefork(而不是工人)? 这些都会以某种方式打败通过APC可以实现的性能提升?
我正在build立一个在LAMP堆栈上运行Ubuntu的新服务器。 我已经安装了sendmail,但似乎没有工作。 这是我在错误日志中的输出: Apr 16 13:46:51 ip-10-33-164-173 sm-mta[12939]: STARTTLS=client, relay=mail.imagine-publishing.co.uk., version=TLSv1/SSLv3, verify=FAIL, cipher=AES256-SHA, bits=256/256 Apr 16 13:46:51 ip-10-33-164-173 sm-mta[12939]: r3GDkeJG012937: to=<[email protected]>, ctladdr=<[email protected]> (33/33), delay=00:00:11, xdelay=00:00:11, mailer=esmtp, pri=120967, relay=mail.imagine-publishing.co.uk. [86.28.80.249], dsn=5.6.0, stat=Data format error Apr 16 13:46:51 ip-10-33-164-173 sm-mta[12939]: r3GDkeJG012937: r3GDkpJG012939: DSN: Data format error Apr 16 13:46:51 ip-10-33-164-173 sm-mta[12939]: r3GDkpJG012939: to=<[email protected]>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, […]
在一个安装了多个软件包(nginx,php等)的服务器上,configuration了.conf文件,我怎样才能避免引入新的configuration参数的更新? 目前每当我更新,我的旧configuration被重命名或覆盖,我必须手动合并两个,这可能是乏味的。 我使用SublimeText2进行开发,就像它有如何设置 – 默认和设置 – 用户分开,所以我可以覆盖我实际上想要修改的设置,并保留其他所有的默认设置。 有没有办法,我可以轻松地做这样的事情与我安装的软件包? 顺便说一下,我正在使用CentOS 6。
我使用ImpressPages CMS v 2.6运行三个不同的站点。ImpressPagesbuild立在PHP 5.3和MySQL 5上。每个站点有大约33个MySQL表,数据库使用MyISAM引擎。 我有两个configuration选项。 首先:我可以为每个站点创build3个不同的数据库。 第二:我可以为每个站点使用不同table_prefix_的单个数据库。 我对上述两个选项感到困惑。 哪个选项可以节省共享主机scheme的资源,而不会影响网站性能。 我正在通过数据库计数限制问题 ,它指出没有没有限制。 的数据库,但我的问题是有多个数据库或多个表在一个数据库中,哪一个更好的select,而不影响性能?
当我写.htaccess这个mod_rewrite RewriteEngine on RewriteRule ^(.*)\.my_extension$ $1.php 并打开url: site.com/index.my_extension这个wroks很好,打开了index.php 但是当我尝试像这样mod_rewrite: RewriteEngine on RewriteRule ^(.*)$ index.php?url=$1 这给我Internal Server Error 。 为何发生这种事? 是什么原因?
我基本上是试图实现Apache MultiViews行为,以便我的URL不需要.php扩展名。 就我从其他问题上看到的服务器故障回答,我应该有这个问题sorting,但是在我的nginxconfiguration中显然是错误的。 行为几乎是正确的; 我可以浏览到/path/to/app/和index.php文件被正确parsing 我可以浏览到/path/to/app/function.php文件被正确parsing 我可以浏览到/path/to/app/media/some.jpg并将其作为静态内容提供 如果我浏览到/path/that/doesnt/exist我得到一个404预期 但是,如果我浏览到/path/to/function try_files指令正确地匹配它到function.php但下载它作为一个静态文件。 这里是configuration文件: server { listen 80; server_name app; root /path/to/app; index index.php index.html index.htm; access_log /var/log/nginx/access.log; location / { allow all; try_files $uri $uri/ $uri.php =404; } location ~ \.php$ { include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; } location ~ /\.ht { deny all; } }