localhost

localhost http 500 internal server error

。_饼干妹妹 提交于 2019-12-03 14:42:31
Sometimes, the localhost that i am using gave me that "http 500 error" whenever i try to access it. But, restarting the computer solved that problem and I could access my files, until today. Today, even though i have changed nothing with my codes(same as yesterday), I cannot access my localhost and phpmyadmin even if i restart the pc. How can i solve it? what went wrong? I dont think that the problem is about my code structure because if it was I could not access localhost yesterday(I changed nothing) Check the error log, it should have a more detailed description of the error. If you're using

How to bind localhost to 127.0.0.1 on Mac? [closed]

强颜欢笑 提交于 2019-12-03 14:19:14
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. I have a running web application on my local machine. To get access to it I can use localhost:8080 . But when I try to use http://127.0.0.1:8080 address my browser says: The 127.0.0.1 page isn’t working . Ping to it does not work as well: ping 127.0.0.1:8080 ping: cannot resolve 127.0.0.1:8080: Unknown host How can I fix it? Open a terminal window and type this line: sudo open -a TextEdit /etc/hosts You will be prompt to

How do I unlock the app engine database when localhost runs?

拥有回忆 提交于 2019-12-03 14:17:17
Right now I get a blank page when localhost runs, but the deployed app is fine. The logs show the "database is locked". How do I "unlock" the database for localhost? This can happen if you're running multiple instances of dev_appserver without giving them distinct datastore files/directories. If you need to be running multiple instances, see dev_appserver.py --help and look at the options for specifying paths/files. Paul Bendevis Dave W. Smith has the right idea. I had this same issue and looking into the docs you need to set the --storage_path='some/path' to be different for each instance of

How to detect if running on localhost

只谈情不闲聊 提交于 2019-12-03 14:15:09
I have a PHP script where I'd like to detect if the user is running on a local machine, not accessible over the Internet. Currently I check for the server address to he 127.0.0.1. Is this the best practice or is there a better way? Localhost always translates to the loopback IP address 127.0.0.1 in IPv4, or ::1 in IPv6, So validating the IP Within your application would be secure, if you mean if(IPAddress::In(array("127.0.0.1","::1"))) { //Show Application } I Very much doubt that you will have a team of elite hackers after your port 80 but as a side note there has been some talk about flaws

[转]跨域问题(CORS / Access-Control-Allow-Origin)

假装没事ソ 提交于 2019-12-03 14:02:21
原文链接:https://blog.csdn.net/xcbeyond/article/details/84453832 1、前言 最近在项目中,调用Eureka REST接口时,出现了CORS跨越问题(Cross-origin resource sharing),在此与大家进行分享,避免多走些弯路。 项目前端(http://localhost:9000)通过Ajax方式调用Eureka REST 接口(http://localhost:8761/eureka/apps)时,却没有任何反应,则通过F12查看日志发现出现“Access-Control-Allow-Origin“类 异常,详细如下: …… http://localhost:8761/eureka/apps. Origin http://localhost:9000 is not allowed by Access-Control-Allow-Origin…… 通过google,发现是由于CORS跨越问题造成的,解决办法无非有两种方式:响应头添加参数和添加过滤器,下面就详细说说CORS跨越问题的起因与详细解决办法。 2、CORS CORS,常被大家称之为跨越问题,准确的叫法是跨域资源共享(CORS,Cross-origin resource sharing),是W3C标准,是一种机制,它使用额外的HTTP头来告诉浏览器

Magento is automatically redirecting to localhost on live server

空扰寡人 提交于 2019-12-03 14:00:42
I have uploaded my website on live server from localhost in magento and when i m writing the url e.g: http://unbeatablewatches.com it is redirecting to localhost/unbeatable-watches.. how to solve this issue .. ? please help me This occurs when the base link urls are not changed in the table core_config_data (records with the following path column). web/secure/base_url web/secure/base_link_url web/unsecure/base_url web/unsecure/base_link_url You must clear the cache after changing them. This also occurs if the var/cache folder is not writable and the cache is written in the OS default tmp

nginx+tomcat 负载均衡

雨燕双飞 提交于 2019-12-03 13:58:01
第一篇nginx for windows 安装: https://www.cnblogs.com/blogxiao/p/8761734.html 第二篇: tomcat 的部署: 1.nginx可以作为反向代理服务器,作为客户端发送请求的门户,这个门户将接受的请求分均衡发给多个应用服务器,达到高负载的效果,典型的就比如tomcat应用服务器。 2.解释一下反向代理:正向和反向是针对服务器来说的,服务器发送给客户端的是正向,客户端向服务器发起的是反向。 3.先下载一个tomcat,然后拷贝成两份 4.在eclipse新建一个简单的web项目,将生成的放到tomcat 的webapps 的目录下 5.开始配置tomcat ,tomcat 最主要的就是端口号 和 项目根路径,配置tomcat 的server 文件,文件的路径tomcat1->conf->server.xml tomcat1端口号配置 <Server port="8006" shutdown="SHUTDOWN"> <Connector connectionTimeout="20000" port="8090" protocol="HTTP/1.1" redirectPort="8443"/> <Connector port="8001" protocol="AJP/1.3" redirectPort="8443"/>

xdebug插件攻击

≯℡__Kan透↙ 提交于 2019-12-03 13:51:55
title: xdebug插件攻击 date: 2017-09-30 17:08:38 tags: 前一阵突然看到一个有关于xdebug的一个攻击面,不得不说这个想法还是很有意思的.自己搭环境记录一下. 关于Xdebug的攻击 刚学php的时候用的phpstorm,当时为了动态调试,配置Xdebug配了很久,当时对这个有一个比较模糊的认识,当时觉得是在浏览器还有ide还有server之间是有某些数据交互的,第一次配的的时候当时ide一直监听收不到数据,当时想要是自己可以操作数据来测试哪里出问题就好了,一直耿耿于怀,前一阵突然看到一个有关于xdebug的一个攻击面,不得不说这个想法还是很有意思的. Xdebug调试的工作流程 1.ide开始调试监听本地9000端口 2.浏览器发送一个带有XDEBUG_SESSION_START的请求发给服务端 3.服务端收到这个参数,就会通知xdebug 4.xdebug收到通知了就会向来源的地址的9000端口发送一个请求 5.ide收到请求并响应建立连接 之后就是相互通讯然后调试代码了 首先Xdebug有关于远程调试是使用的 DBGp 协议 下面是有关于通讯流程的一个演示 利用条件 一般来说关于 xdebug.remote_host 这个配置默认是localhost也就是默认通讯的的都是localhost,这明显不利于我们的利用 但是如果

localhost Won't Immediately Update

♀尐吖头ヾ 提交于 2019-12-03 12:50:47
I have been using XAMPP to connect to localhost to do editing on my computer for websites. I have been using it for over a year now and in the past whenever I would update the local file, I could refresh the page on my browser and it would immediately update. Now, I can't get it to update even if, for example, an image file has changed. I'm wondering if it's an issue with cookies (which I haven't had in the past). Is there a common reason that this happens? I couldn't find anything upon a search. Thanks for the help! First thing to try would be clearing browser history/cache and reloading the

Can't access localhost via IP address

一个人想着一个人 提交于 2019-12-03 12:37:27
I'm viewing a locally hosted website (using grunt serve , if that matters). I can view it via http://localhost:9000/ or http://127.0.0.1:9000/ , but not via http://10.0.0.16:9000/ . 10.0.0.16 is my local IP address (from ifconfig or System Preferences), but I cannot access my locally hosted content at http://10.0.0.16:9000/ from either the device that is hosting it or from other devices on the network. I haven't had trouble using my local IP address to access locally hosted sites when my computer is on other networks, only on my home network. Do you have any idea what needs to change? If you