一 相关知识 1)默认地,标准的输入为键盘,但是也可以来自文件或管道(pipe |)。 2)默认地,标准的输出 […]
在MAC系统里添加Nginx开机启动任务
贴代码之前,大家先普及基础知识,链接在此: http://www.tanhao.me/talk/1287.ht […]
ownCloud的Nginx配置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
upstream php-handler { server 127.0.0.1:9000; #server unix:/var/run/php5-fpm.sock; } server { listen 80; server_name example.com; return 301 https://$server_name$request_uri; } server { listen 443 ssl; server_name example.com; ssl_certificate /etc/ssl/nginx/cert.pem; ssl_certificate_key /etc/ssl/nginx/cert.key; root /var/www; client_max_body_size 1000M; # set max upload size fastcgi_buffers 64 4K; # ownCloud blacklist location ~ ^/owncloud/(?:\.htaccess|data|config|db_structure\.xml|README) { deny all; error_page 403 = /owncloud/core/templates/403.php; } location / { index index.html; } location /owncloud/ { error_page 403 = /owncloud/core/templates/403.php; error_page 404 = /owncloud/core/templates/404.php; rewrite ^/owncloud/caldav(.*)$ /remote.php/caldav$1 redirect; rewrite ^/owncloud/carddav(.*)$ /remote.php/carddav$1 redirect; rewrite ^/owncloud/webdav(.*)$ /remote.php/webdav$1 redirect; rewrite ^(/owncloud/core/doc[^\/]+/)$ $1/index.html; # The following rules are only needed with webfinger rewrite ^/owncloud/.well-known/host-meta /public.php?service=host-meta last; rewrite ^/owncloud/.well-known/host-meta.json /public.php?service=host-meta-json last; rewrite ^/owncloud/.well-known/carddav /remote.php/carddav/ redirect; rewrite ^/owncloud/.well-known/caldav /remote.php/caldav/ redirect; try_files $uri $uri/ index.php; } location ~ \.php(?:$|/) { fastcgi_split_path_info ^(.+\.php)(/.+)$; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param HTTPS on; fastcgi_pass php-handler; } # Optional: set long EXPIRES header on static assets location ~* ^/owncloud(/.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf))$ { expires 30d; access_log off; # Optional: Don't log access to assets } } |
CentOS7 Nginx FastCGI sent in stderr: “Primary script unknown”
Hello world!
利用proxychains在终端使用socks5代理
项目主页:https://github.com/rofl0r/proxychains-ng Linux下使用 […]
解决禅道zentaopms用IP无法访问SVN源码
原因: SVN访问采用https配置,用ip访问时https无法显示,需要认证 解决: 禅道中访问svn源码时 […]
VisualSVN Server配置禁止IP访问
在安装目录下\VisualSVN Server\conf 更改httpd.conf加入 Include con […]
Maven发布文件包括jar、pom、source及javadoc
首先检查maven deploy plugin版本,有部分属性是高版本才能用,可以查看文档:http://ma […]
解决Jetty找不到jar包中tld文件
使用spring-mvc框架时,jetty找不到spring.tld和spring-form.tld 只能把s […]
WIN7下黑苹果懒人版硬盘安装not a HFS partition注意问题
1 分区时不要格式化,有人提出用FAT,WIN7没有格式化FAT选项,所以不格式化,分配一个卷标就行了 2 以 […]
Vsftpd配置虚拟目录
用vsftp来配置访问其它目录, 比如: /home/a 映射为 ftp://localhost/a /hom […]
VisualSVN Server限制内网访问某些版本库
因为VisualSVN Server采用Apache作为服务器,因此可以设置Apache的访问限制。 在安装完 […]
Mac远程桌面链接Windows
一直用Mac的Royaltsx连接各种终端,今天连接Windows7旗舰版的时候,突然无法连接了,账户和密码正 […]
Mysql Access denied for user ‘root’@’localhost’ (using password:YES) 解决方案
输入“mysql -uroot -pmyadmin”后出现以下错误: “Access denied for u […]
谈mysql中utf8和utf8mb4区别
一、简介 MySQL在5.5.3之后增加了这个utf8mb4的编码,mb4就是most bytes 4的意思, […]
应用服务器配置SSL证书 + HTTPS站点
一、Nginx 1,生成SSL证书 2,nginx配置 [crayon-6866a936d6f07554617 […]
利用openssl生成ssl服务器证书
0. 前期准备工作
1 2 3 4 5 6 7 8 9 |
cd ~/ mkdir ssl cd ssl mkdir demoCA cd demoCA mkdir newcerts mkdir private touch index.txt echo '01' > serial |
1. 制件 CA 证书 […]
Mac OS X mysql_connect报告“No such file or directory”错误的解决方法
今天在MacBookPro上安装wordpress时,安装程序一直报错说连不上数据库。mysql客户端可以正常 […]
linux expect自动登录ssh,ftp
expect是一种能够按照脚本内容里面设定的方式与交互式程序进行“会话”的程序。根据脚本内容,Expect可以 […]
Linux下用SCP无需输入密码传输文件
在Linux环境下,两台主机之间传输文件一般使用scp命令,通常用scp命令通过ssh获取对方linux主机文 […]
Yii2路径优化隐藏index.php
1.开启apache-rewrite LoadModule rewrite_module modules/mo […]
利用.htaccess绑定子域名到子目录
根目录下的.htaccess文件内容:film Despicable Me 3 <IfModule mo […]
Linux的/etc/sysconfig/i18n文件详解
i18n是internationalization的缩写,意思指i和n之间有18个字母。/etc/syscon […]
远程访问Mysql Host is not allowed to connect to this MySQL server
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
如果你想连接你的mysql的时候发生这个错误: ERROR 1130: Host '210.13.92.66' is not allowed to connect to this MySQL server 请按照如下方法解决: login as: root ///登陆系统 root@tqwm.cn's password: ///输入密码 Last login: Tue Apr 15 14:06:54 2008 from 210.13.92.66 [root@myserver ~]# /usr/local/mysql/bin/mysql -uroot -hlocalhost -p ///登入mysql Enter password: ///输入mysql对应用户的密码 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 431 Server version: 5.0.58-enterprise-gpl-log Source Type 'help;' or '\h' for help. Type '\c' to clear the buffer. ///登入成功的提示信息 mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'rootpasswd' WITH GRANT OPTION; ///输入这段指令并回车后允许所有用root用户并且输入rootpasswd密码的主机登入该mysql Server 如果将'%'换成'10.1.1.1'那么只有10.1.1.1的主机可以登陆. Query OK, 0 rows affected (0.07 sec) mysql> \q ///退出mysql Bye [root@myserver ~]# 另外还有一种方法转自其他地方 改表法。可能是你的帐号不允许从远程登陆,只能在localhost。这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 "user" 表里的 "host" 项,从"localhost"改称"%" mysql -u root -pvmwaremysql>use mysql;mysql>update user set host = '%' where user = 'root';mysql>select host, user from user; 自己的解决方法: 直接在cmd 下进入mysql\bin 下 运行 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION |
PL/SQL 中文乱码解决方案
1. 使用的是服务器上的,不是本机的Oracle,按下面做就可以了: 设置环境变量:NLS_LANG,具体值用 […]