localhost

Access Tomcat localhost:8080 of guest VirtualBox VM from Host OS

你离开我真会死。 提交于 2020-01-12 14:00:55
问题 I have an XP laptop on which I am running an Ubuntu distro inside VirtualBox which is running a website via Tomcat. When I am in the VM I can access the site with localhost:8080/ What I really need to do, though, is to access the VM localhost from XP. vm-computer-name:8080/ isn't recognized. Any help is much appreciated. 回答1: Get the IP Address of your guest OS and access it via that. 回答2: Setup your VM to run a host-only network, then reboot or restart networking to update DHCP. The IP

Tomcat Context配置

浪尽此生 提交于 2020-01-12 11:43:09
<Context>元素的属性: path:指定访问该Web应用的URL入口。 docBase:指定Web应用的文件路径,可以给定绝对路径,也可以给定相对于<Host>的appBase属性的相对路径,如果Web应用采用开放目录结构,则指定Web应用的根目录,如果Web应用是个war文件,则指定war文件的路径。(指定项目所在地址) reloadable:如果这个属性设为true,tomcat服务器在运行状态下会监视在WEB-INF/classes和WEB-INF/lib目录下class文件的改动,如果监测到有class文件被更新的,服务器会自动重新加载Web应用。 在默认安装后,tomcat的主目录是webapps/root目录,如果我们想改变tomcat的主目录的话可以这样做: 1.打开C:/Tomcat/conf/server.xml,在<host></host>之间加入代码: <Context path=”” docBase=”E:/tomcatApp/JeasyCMS” debug=”0″ reloadable=”true” crossContext=”true”/> 这样重新启动tomcat,我们的主目录就被设置为jeasyCMS这个项目了。 2.另外tomcat会生成一个C:/Tomcat/conf/Catalina/localhost目录,里面自动生成了一个ROOT

Memcached查看和清理

谁说胖子不能爱 提交于 2020-01-12 07:13:06
1.一种 telnet localhost 11211 #登陆 stats #查看状态 flush_all #清理 quit #退出 2.又学到一个: echo 'flush_all' | nc localhost 11211 3. 1、数据存储(假设key为test,value为12345) printf "set test 0 1 5\r\n12345\r\n" | nc localhost 11211 STORED 2.数据取回(假设key为test) printf "get test\r\n" | nc localhost 11211 VALUE test 0 5 12345 END 3.数据增加1(假设key为test并且value为正整数) printf "incr test 1\r\n" | nc localhost 11211 123456 4.数值减少3(假设key为test,并且value为正整数) printf "decr test 3\r\n" | nc localhost 11211 5.数据删除(假设key为test) printf "delete test\r\n" | nc localhost 11211 DELETED 6.查看Memcached状态 printf "stats\r\n" | nc localhost 11211 7.模拟top命令

centos6.5修改主机名

梦想与她 提交于 2020-01-12 05:01:30
centos 修改主机名 0.说明 系统安装后,系统默认的主机名称是localhost,现在想要修改为master。操作需要root权限。 1.方案一:仅当前登录有效,重启后失效 直接在命令行执行命令,一步完成: hostname master 2.方案二:修改配置文件,永久有效 2.1修改/etc/sysconfig/network中的hostname vi /etc/sysconfig/network HOSTNAME=master #修改localhost.localdomain为master 2.2修改/etc/hosts文件 vi /etc/hosts 127.0.0.1 master localhost #修改localhost.localdomain为master 特别说明:可以不改127.0.0.1后面的默认主机名。改了的话可能会有某些网络应用误把主机master解析到127.0.0.1上去,导致运行失败,当然个人认为可能性比较低。可以在对本机设置IP后,在/etc/hosts的最后加一行: “IP 主机名”,这样也可以实现。 2.3重启使修改生效 shutdown -r now #重启服务器 来源: https://www.cnblogs.com/fefjay/p/6044372.html

Why does my page redirect to localhost in my wordpress blog?

左心房为你撑大大i 提交于 2020-01-12 04:45:34
问题 This is my site URL http://www.weblogicsol.com/ , Here I installed a wordpress theme having URL http://www.weblogicsol.com/blog , the problem is this when I want to open the wp-admin (means when I write http://www.weblogicsol.com/blog/wp-admin) it redirect to localhost . Please help me to solve this problem, I am in trouble. And if I write this code in wp-config file define('WP_HOME','http://example.com'); define('WP_SITEURL','http://example.com'); then this URL appears with an error message.

How to set up local subdomains for Node.js app

∥☆過路亽.° 提交于 2020-01-12 03:16:12
问题 I am running an express app on node.js. The app uses the express-subdomain module to help handle routes for two different subdomains (sub1.example.com and sub2.example.com). I'm hosting the app on AWS Elastic Beanstalk. In my production environment, everything works great. But on my local machine, I cannot get this to work. I tried adding the subdomains to my host file 127.0.0.1 localhost sub1.localhost sub2.localhost . Although that allows me to prepend a subdomain to localhost, the module

How to set up local subdomains for Node.js app

别说谁变了你拦得住时间么 提交于 2020-01-12 03:16:08
问题 I am running an express app on node.js. The app uses the express-subdomain module to help handle routes for two different subdomains (sub1.example.com and sub2.example.com). I'm hosting the app on AWS Elastic Beanstalk. In my production environment, everything works great. But on my local machine, I cannot get this to work. I tried adding the subdomains to my host file 127.0.0.1 localhost sub1.localhost sub2.localhost . Although that allows me to prepend a subdomain to localhost, the module

docker打开api remote接口设置

ぐ巨炮叔叔 提交于 2020-01-11 20:55:42
前言 本文记录docker怎么打开api remote接口设置,docker的版本更新太快了,不同的版本之间,设置可能不同,本文是针对docker13.1 1、 查看配置文件位于哪里 systemctl show --property=FragmentPath docker 2、编辑配置文件内容,接收所有ip请求 vim /lib/systemd/system/docker.service ExecStart=/usr/bin/dockerd -H unix:///var/run/docker.sock -H tcp://0.0.0.0:5678 3、重新加载配置文件,重启docker daemon sudo systemctl daemon-reload sudo systemctl restart docker 4、测试 [root@node1 docker]# docker -H localhost:5678 version Client: Version: 1.13.1 API version: 1.26 Go version: go1.7.5 Git commit: 092cba3 Built: Wed Feb 8 06:38:28 2017 OS/Arch: linux/amd64 Server: Version: 1.13.1 API version: 1.26

Windows下ElasticSearch的Head安装及基本使用

天大地大妈咪最大 提交于 2020-01-11 20:47:23
前段时间,有一朋友咨询我,说es的head插件一直安装失败,为了给朋友解惑,自己百度博文并实践了一番,也的确踩了些坑,但我给爬了起来。今天就来分享下实践心得并跳过的坑。 ElasticSearch 是一个分布式、高扩展、高实时的搜索与数据分析引擎,它能很方便的使大量数据具有搜索、分析和探索的能力,简称es。本文分五部分描述,es的安装,head插件安装,es的基本概念,es的基本使用,问题总结。 目录 es安装 head插件安装 es基本概念 es基本使用 问题总结 一、es安装 安装方式网络上有很多,这里简单说下步骤,具体实践是很简单的 ①配置java环境 需要java环境,最好是较新的java环境,java环境的配置就略过了 ②安装elasticsearch 下载地址: https://www.elastic.co/cn/downloads/elasticsearch ,最新版本已是7.2.0。下载后,解压到任意目录,我的路径是:D:\elasticsearch-7.2.0 ③启动elasticsearch es的配置文件在config目录下,常用配置在elasticsearch.yml文件。我这里只是做学习目的,所以不修改此文件而直接启动es。在windows环境下启动es方法为命令行进入到bin\目录下,执行elasticsearch.bat,或者双击此文件以启动es。

从零搭建WNMP环境

泪湿孤枕 提交于 2020-01-11 19:02:31
WNMP环境搭建步骤 三大件安装 Nginx安装 PHP安装 MySQL安装 三大件配置 Nginx配置 PHP配置 MySQL配置 三大件联调 PHP连接Nginx PHP连接MySQL 常用脚本和命令 start_nginx.bat stop_nginx.bat 常用命令 三大件安装 Nginx安装 下载地址: http://nginx.org/en/download.html 选择稳定版本: 下载文件名称: nginx-1.16.1.zip 解压压缩包,并进入目录,比如 D:\wnmp\nginx 运行 nginx.exe 打开浏览器,地址栏输入:localhost,回车 出现该页面,则安装成功。 PHP安装 下载地址: https://windows.php.net/download#php-7.4 选择非线程安全版本 下载文件:php-7.4.1-nts-Win32-vc15-x64.zip 解压压缩包,并进入目录,比如: D:\wnmp\php 打开cmd,运行命令 php -v 出现该页面,则安装成功。 MySQL安装 下载地址: https://dev.mysql.com/downloads/mysql/ 选择 下载 -> No thanks, just start my download. 下载文件:mysql-8.0.18-winx64.zip 解压压缩包