how to add HTTPS for appserv on localhost - https

hi every body i wont add HTTPS to local host
like https://localhost or https://127.0.0.1
ho to do that in Appserv

Related

Mac OS local proxy, connect ECONNREFUSED ::1:3000

I have a create-react-app app running on localhost:3000 and a proxy server running on localhost:4000 that redirects some of my request to port 3000.
Requesting localhost:3000/ correctly returns index.html file,
Requesting localhost:4000/ returns connect ECONNREFUSED ::1:3000 with 502 code.
The exact same setup works properly on Ubuntu (returns index.html from localhost:4000) and Windows so I am sure proxy works fine.
Proxy is built using https://www.npmjs.com/package/http-proxy but i was unable to find any solution to this in documentation.
My question is: Does mac require changing some extra settings to allow this kind of traffic?
One solution is to edit /etc/hosts and remove ::1 localhost mapping or change it to ::1 ip6-localhost (default setting on ubuntu)

how to map 127.0.0.1 to example.com in SpringBoot

It is possible in SpringBoot to map localhost into example.com like in Laravel, like below?
How to change localhost url for Laravel
Adding the following:
127.0.0.1 example.com
to your C:\Windows\System32\drivers\etc\hosts file should suffice.
Add this to your hosts file
127.0.0.1 example.com
Or if you are using linux you can set this as your hostname
example.com

Safari can’t connect to the server local host

Whenever I start Tomcat, and open http://localhost:8080 I get the following error.
Safari can’t open the page “localhost:8080” because Safari can’t connect to the server “localhost”.
It used to work before today. All I did earlier today was block some websites using the host files, but I restored them back again, and now it looks like this.
#
##
# Host Database
#
#
# localhost is used to configure the lookback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
If I start and stop the server using Eclipse, it works. But localhost can’t connect to server using Safari or Google Chrome either..
I know there are a lot of similar questions, but none of them seemed to help.
Thanks a lot in advance!

How to set proxy for JMeter from behind another proxy?

I'm new to jmeter.
I'm trying to test a web app using proxy server.
I have gone through the jmeter docs and got the settings but I'm currently working under company proxy.
So how can I set the proxy server for jmeter from behind the current proxy?
Read :
https://jmeter.apache.org/usermanual/get-started.html#proxy_server
If you are testing from behind a firewall/proxy server, you may need to provide JMeter with the firewall/proxy server hostname and port number.
To do so, run the jmeter.bat/jmeter file from a command line with the following parameters:
- '-H' [proxy server hostname or ip address]
- '-P' [proxy server port]
- '-N' [nonproxy hosts] (e.g. *.apache.org|localhost)
- '-u' [username for proxy authentication - if required]
- '-a' [password for proxy authentication - if required]
Example :
jmeter -H my.proxy.server -P 8000 -u username -a password -N localhost
Alternatively, you can use --proxyHost, --proxyPort, --username, and --password
If you're looking to learn jmeter correctly, this book will help you.
Change Port and Proxy on JMeter 5.0
used the Proxy and the Port below Just as example , it was origenal answer for this question - Cannot capture jmeter traffic in fiddler
UI Mode
Create Thread Group --> HTTP Request
Go to Advanced fill "Server Name or IP:" = 127.0.0.1 , "Port Number:" = 8888
Non UI MODE
Add to your command -H 127.0.0.1 for Proxy Host
-P 8888 for Proxy port
Example:
C:\jmeter5.0\bin>jmeter -n -t C:\example.jmx -l C:\scriptresults.jtl -H 127.0.0.1 -P 8888

how to redirect example.com to 127.0.0.0/main/test?

i'm using wamp 5, windows XP. i have edited my host file in my local disk like the code below and it works
127.0.0.0 example.com
but i'd like to redirect to a particular folder, if i change it to the code below, it dont work
127.0.0.0/main/site example.com
how to redirect example.com to 127.0.0.0/main/site locally in my PC?
btw, i dont want to install any new software to solve this prob
You need to create a Virtual Hosts
Leave the HOST file as
127.0.0.1 example.com
When you define a Virtual Host you also tell it which folder is its DocumentRoot so that will send it to the right place when you use the address example.com in the browser.
Check out wampserver.com

Resources