localhost

docker上启动nginx,并配置修改nginx的配置文件

大城市里の小女人 提交于 2020-01-07 08:07:44
docker上启动nginx,并配置修改nginx的配置文件 1.使用docker 下载nginx 镜像 docker pull nginx 2.启动nginx docker run --name nginx -p 80:80 -d nginx 这样就简单的把nginx启动了,但是我们想要改变配置文件nginx.conf ,进入容器,命令: docker exec -it nginx bash nginx.conf配置文件在 /etc/nginx/ 下面,但是你使用vim nginx.conf 或者vi nginx.conf 会发现vi或者vim命令没有用,解决办法:apt-get update 完成之后 apt-get install vim 此时你就可以自己定制nginx.con文件了,改好配置文件之后重启容器,步骤,先把容器停了 docker stop nginx 然后重启 docker start nginx 这样不是很方便,还有第二种方式,挂载配置文件,就是把装有docker宿主机上面的nginx.conf配置文件映射到启动的nginx容器里面,这需要你首先准备好nginx.con配置文件,如果你应经准备好了,下一步是启动nginx 命令:docker run --name nginx -p 80:80 -v /home/docker-nginx/nginx.conf:

[问题解决] Mysql8.0.13 登录报1045(28000)错误

荒凉一梦 提交于 2020-01-06 22:04:57
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 以下修改登录密码报错: mysql-8.0.13 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 一、修改root密码 mysql> update mysql.user set authentication_string="123456" where user="root"; 或:mysql>update mysql.user set authentication_string="123456" where user="root" and host='localhost'; #刷新权限(必须步骤) mysql> flush privileges; #查询密码是否生效: mysql> select host,user,authentication_string from mysql.user; mysql-8.0.13修改密码后mysql>quit 再次登录。 >mysql - u root -p password:123456 报错:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password:

localhost redirect to other site… trojan?

你。 提交于 2020-01-06 20:10:55
问题 As title, seems there's a trojan on my server When I put a url like localhost/mysite it redirect to the site free-merchants.com and then return to my site... But if I put 127.0.0.1/mysite all work correctly... Then, what is? I scan with avast and malwarebytes and no virus... With HijackThis I can't see any strange thing... File hosts have only row 127.0.0.1 localhost Can be a bug of my webserver that run with Apache/2.2.21 (Win32) PHP/5.4.32 Or what I must scan? 回答1: Use JRT (junkware removal

MySQL issue connecting to site with php

一世执手 提交于 2020-01-06 19:42:35
问题 Every time I try to connect to my localhost (using MAMP), it tells me that either access was denied or that it can't connect!!! It is driving me crazy! I have the php example below. What am I missing, because apparently nobody on the web is having this same problem... //setup db connection $link = mysqli_connect("localhost","root",""); mysqli_select_db($link, "iReport") 回答1: Try... //Database Information $dbhost = "serverip"; $dbname = "databasename"; $dbuser = "username"; $dbpass = "password

MySQL issue connecting to site with php

谁说我不能喝 提交于 2020-01-06 19:41:11
问题 Every time I try to connect to my localhost (using MAMP), it tells me that either access was denied or that it can't connect!!! It is driving me crazy! I have the php example below. What am I missing, because apparently nobody on the web is having this same problem... //setup db connection $link = mysqli_connect("localhost","root",""); mysqli_select_db($link, "iReport") 回答1: Try... //Database Information $dbhost = "serverip"; $dbname = "databasename"; $dbuser = "username"; $dbpass = "password

AJAX is not working properly after moving on localhost

早过忘川 提交于 2020-01-06 19:26:17
问题 I have an issue with my simple testing code. Everything was fine on remote server, it starts when I moved to localhost(xampp) I have a page: http://localhost/test/test.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>NeedNext - Try It</title> <script type="text/javascript" src="javascript

Dockerfile指令详解

瘦欲@ 提交于 2020-01-06 17:30:52
博文大纲: dockerfile基本结构 dockerfile常用指令 FROM——指定基础镜像 MAINTAINER——指定维护者信息 RUN——运行指令 COPY——复制文件\目录 ADD——更高级的复制文件\目录 ENV——设置环境变量 ARG——构建参数 EXPOSE——暴露端口 CMD——容器启动命令 ENTRYPOINT——入口点 ENTRYPOINT和CMD组合使用 VOLUME——定义匿名卷 USER——指定当前用户 WORKDIR——指定工作目录 ONBUILD——为他人做嫁衣 1、Dockerfile基本结构 Dockerfile由一行行命令语句组成,并且支持以#开头的注释行。 一般Dockerfile分为四部分:基础镜像信息、维护者信息、镜像操作指令和容器启动时执行指令。如下: # This dockerfile uses the ubuntu image # VERSION 2 - EDITION 1 # Author: Ray # Command format: Instruction [arguments / command] .. # Maintainer: docker_user <docker_user at email.com> (@docker_user) MAINTAINER Ray 916551518@qq.com # Commands

微信小程序本地服务器localhost真机调试无法获取数据

家住魔仙堡 提交于 2020-01-06 14:02:06
解决本地localhost 在手机调试无法获数据问题 开发者工具中能够正常预览 代码 wx . request ( { url : `http://localhost:9000/order/add` , method : 'POST' , data : { order //将当前数据发送 后台 } , header : { 'content-type' : 'application/json' } , success : res => { if ( res . data . code == 200 ) { wx . switchTab ( { url : '../my/main' } ) } } } ) 真机调试 无法获取到数据 解决 1.将电脑和手机换成同一个局域网下 2.将localhost换成本地ip 注:同一个网络 手机: 电脑: 查看本地IP 将localhost换成192.168.3.10 wx . request ( { url : `http://192.168.3.10:9000/order/add` , method : 'POST' , data : { order //将当前数据发送 后台 } , header : { 'content-type' : 'application/json' } , success : res => { if ( res .

127.0.0.1 not working on wamp server

*爱你&永不变心* 提交于 2020-01-06 13:26:09
问题 I have installed WAMP in my system and http://localhost is working nicely. but when i got 127.0.0.1 then it gives Forbidden error: Forbidden You don't have permission to access / on this server. I don't know what is this error for in httpd.config i have give permission to allow all: <Directory "c:/wamp/www/"> Options Indexes FollowSymLinks AllowOverride all Order Deny,Allow Allow from all Allow from 127.0.0.1 </Directory> and if i set in my host file 127.0.0.1 localhost 127.0.0.1 test and

虚拟机VM下 UBUNTU 下安装Mantis

☆樱花仙子☆ 提交于 2020-01-06 11:48:30
<<Mantis规范.pdf>> 参考: http://www.linuxidc.com/Linux/2016-01/127180.htm (次为参考主线) http://www.jb51.net/article/91098.htm “安装软件包”和“安装mantis”;Linux Ubuntu 下 LAMP 环境搭建 Apache 、 MySQL 、 PHP 参考: http://www.linuxidc.com/Linux/2016-01/127180.htm 安装过程遇到的问题: 安装apache2 后重启下Apache: 输入sudo /etc/init.d/apache2 restart会出现如下问题: apache2: Could not reliably determine the server's fully qualified domain name 解决方法 vim /etc/apache2/apache2.conf 最后加入一句 ServerName localhost:80 2.安装PHP测试脚本存放的位置需要注意: sudo apt-get install php5 libapache2-mod-php5 测试PHP sudo vim /var/www/html/info.php 目录路径一定要正确, 写入以下内容 <?php echo phpinfo()