我正在尝试按照这里的教程设置用户并通过。 它在那里说“这个部分只适用于你的MySQL服务器运行在–skip-show-database”的情况。 第一个问题是,如何检查MySQl服务器是否正在运行–skip-show-database? 有没有办法可以访问phpMyAdmin的SQL查询窗口没有login? 否则,我不得不从命令行执行这个SQL。 我也得到这个: 无法加载mcrypt扩展名。 请检查您的PHPconfiguration。 我已经将mcrypt.so添加到php.ini中,并执行以下命令certificate我拥有它。 [root@DT html]# rpm -qa | grep mcrypt mcrypt-2.6.8-1.el5 php-mcrypt-5.3.5-1.1.w5 libmcrypt-2.5.8-4.el5.centos [root@DT html]# php -v PHP 5.3.5 (cli) (built: Feb 19 2011 13:10:09) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies 现在当我去phpinfo()并searchmcrypt时,它可以在configuration命令行('–with-mcrypt = shared,/ usr')中find它。 那么,接下来要做什么? 更新:我没有把extension=mcrypt.so在php.ini,因为它会抱怨以下几点: PHP Warning: Module 'mcrypt' […]
我们有一台服务器,Core i7,24GB RAM,我们运行一些我们自己的应用程序。 我想提供一些客户端PHP / MySQL在该服务器上托pipe。 是否易于和可能为每个客户端创build一个自己的nginx / PHP的CGI / MySQL安装的chroot? 我们在服务器上运行清漆。 我的想法是configuration清漆转发请求到chrooted nginx我们会为每个客户端。
我只是在这里教程。 它在那里说: 这将在sites-available目录中为Nginx创build虚拟主机文件。 只需将以下内容粘贴到文件中,并将“example.com”的每个实例更改为您网站的域名: server { listen 80; server_name www.example.com; rewrite ^/(.*) http://example.com/$1 permanent; } server { listen 80; server_name example.com; access_log /var/www/example.com/logs/access.log; error_log /var/www/example.com/logs/error.log; location / { root /var/www/example.com/public/; index index.html; } } 问题是,我没有域名,我有一个IP地址…所以我应该怎么改变example.com? 我试图将其更改为我的IP地址,但它不起作用
我的Django应用程序保存图像,他们被保存为nobody:没有人而不是www-data:就像他们以前在不同的服务器下。 nginx设置为用户www-data,我以root身份运行manage.py runfcgi,因此权限不应该成为问题。
我正在尝试将nginx设置为使用SSL连接的Tomcat服务器的反向代理。 当客户端浏览器调用nginx反向代理的IP时,我希望客户端的浏览器加载我的tomcat应用程序。 我的tomcat应用程序的地址是192.168.25.25,而nginx的代理地址是192.168.25.50 在我的nginx.conf文件中,我添加了这些行 location / { proxy_pass https://192.168.25.25:443/myapp/; proxy_redirect https://192.168.25.25/myapp/ https://192.168.25.25/; } 我的应用程序中的一些图像存储在192.168.25.25 /图像/。 现在这些目录不能被访问,因为proxy_pass设置为192.168.25.25:443/myapp。 有没有办法访问图像目录还不更改proxy_pass? 提前致谢。
我试图在Ubuntu 10.04(在子URI上)为Ruby on Rails应用程序提供Passenger支持来设置nginx webserver。 一切正常,直到我试图从浏览器访问服务器/应用程序。 我的nginx的安装位于/opt/nginx位置 # my nginx.conf server { listen 80; server_name www.mydomain.com; root /websites/site/public; passenger_enabled on; passenger_base_uri /site; location / { # added by default, I don't know if its supposed to be here or not root html; index index.html index.htm; } 然后我启动了服务器。 但是当我把www.mydomain.com/site放入浏览器时,我得到了404 Not Found错误。 Error.log显示这个: 2011/03/04 10:07:07 [error] 21387#0: […]
我只是在我的专用服务器上安装并部分configuration了nginx。 但是我对理解正则expression式有些困难。 我想让nginxredirectwww.mydomain.com/forum/和www.mydomain.com/forum(注意缺less的尾部斜杠;不区分大小写;同样适用于“forums”而不是“forum”)到forum.mydomain .COM /。 这就是我想到的: location ~* ^/(forum|forums) { rewrite ^/(.*)/(.*)$ http://forum.mydomain.com/$2? permanent; } …但由于某种原因,它只适用于斜线。 : – / 请帮帮我! 提前致谢!
我得到一些nginx错误,因为我可以看到他们在我无法理解的error.log。 他们看着像是: 错误: 2011/03/13 21:48:21 [crit] 14555#0: *323314343 open() "/usr/local/nginx/proxy_temp/0/95/0000000950" failed (13: Permission denied) while reading upstream, client: XX.XX.XX.XX, server: , request: "GET /abc.jpg 2 HTTP/1.0", upstream: "http://192.168.162.141:80/abc.jpg", host: "example.com", referrer: "http://domain.com" 2011/03/13 22:00:07 [crit] 14552#0: *324171134 open() "/usr/local/nginx/proxy_temp/1/95/0000000951" failed (13: Permission denied) while reading upstream, client: XX.XX.XX.XY, server: , request: "GET mno.png HTTP/1.1", upstream: […]
这里是我的conf文件:usr / local / nginx / sites-available / default server { listen 80; server_name localhost; location / { root html; index index.php index.html index.htm; } # redirect server error pages to the static page /50x.html error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } # serve static files directly location ~* […]
是否可以configurationnginx,以便域/〜用户代理为该用户预留的端口。 然后用户可以在该端口上运行另一个nginx或unicorn实例。 那可能吗? 我想要一个控制用户端口号关系的数据库。