can not access local HTTPS site from another PC on Ubuntu 16.4 [closed]
Clash Royale CLAN TAG#URR8PPP
up vote
-2
down vote
favorite
I was developing a PWA(Progressive Web Application) on my Ubuntu 16.4 Offline and one requirement of the framework is an HTTPS connection to be able to run.
I configured my Apache server and enabled the HTTPS VirtualHost configuration. But the problem with the configuration is that I can't access it via HTTPS, only HTTP can access the local site. Apparently, the site works well on the development machine on both protocols.
ubuntu apache-virtualhost
closed as too broad by Jeff Schaller, Christopher, Vlastimil, dr01, Thomas Mar 23 at 18:39
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |Â
up vote
-2
down vote
favorite
I was developing a PWA(Progressive Web Application) on my Ubuntu 16.4 Offline and one requirement of the framework is an HTTPS connection to be able to run.
I configured my Apache server and enabled the HTTPS VirtualHost configuration. But the problem with the configuration is that I can't access it via HTTPS, only HTTP can access the local site. Apparently, the site works well on the development machine on both protocols.
ubuntu apache-virtualhost
closed as too broad by Jeff Schaller, Christopher, Vlastimil, dr01, Thomas Mar 23 at 18:39
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
3
... and the error you get is...?
â Jeff Schaller
Mar 23 at 10:29
3
... and the steps you took to enable HTTPS were...?
â Jeff Schaller
Mar 23 at 10:30
add a comment |Â
up vote
-2
down vote
favorite
up vote
-2
down vote
favorite
I was developing a PWA(Progressive Web Application) on my Ubuntu 16.4 Offline and one requirement of the framework is an HTTPS connection to be able to run.
I configured my Apache server and enabled the HTTPS VirtualHost configuration. But the problem with the configuration is that I can't access it via HTTPS, only HTTP can access the local site. Apparently, the site works well on the development machine on both protocols.
ubuntu apache-virtualhost
I was developing a PWA(Progressive Web Application) on my Ubuntu 16.4 Offline and one requirement of the framework is an HTTPS connection to be able to run.
I configured my Apache server and enabled the HTTPS VirtualHost configuration. But the problem with the configuration is that I can't access it via HTTPS, only HTTP can access the local site. Apparently, the site works well on the development machine on both protocols.
ubuntu apache-virtualhost
asked Mar 23 at 10:21
Romart Mediante
31
31
closed as too broad by Jeff Schaller, Christopher, Vlastimil, dr01, Thomas Mar 23 at 18:39
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as too broad by Jeff Schaller, Christopher, Vlastimil, dr01, Thomas Mar 23 at 18:39
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
3
... and the error you get is...?
â Jeff Schaller
Mar 23 at 10:29
3
... and the steps you took to enable HTTPS were...?
â Jeff Schaller
Mar 23 at 10:30
add a comment |Â
3
... and the error you get is...?
â Jeff Schaller
Mar 23 at 10:29
3
... and the steps you took to enable HTTPS were...?
â Jeff Schaller
Mar 23 at 10:30
3
3
... and the error you get is...?
â Jeff Schaller
Mar 23 at 10:29
... and the error you get is...?
â Jeff Schaller
Mar 23 at 10:29
3
3
... and the steps you took to enable HTTPS were...?
â Jeff Schaller
Mar 23 at 10:30
... and the steps you took to enable HTTPS were...?
â Jeff Schaller
Mar 23 at 10:30
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
I have actually had the same problem. I'll be interested to see a solution. I used a workaround and sacrificed encryption when accessed locally. Everything works fine from outside the network though. I edited /etc/hosts to map directly to local ip rather than having the DNS request happen remotely to send me back to my network.
Example
127.0.1.1 hostname
127.0.0.1 localhost
Local.app.ip www.example.com
This doesn't fix anything it's just convenient since otherwise it defaults to https and then won't load.
One of the machines I had this problem on was a laptop which posed a problem if I changed the hosts file and then was outside my local network. It would still try to connect to a local ip. I solved this with a bash script I found online that changes the file based on if a certain wifi network is available. Just for fun here is the script.
wifi=`iwlist wlp3s0 scan | grep SSID`
if [[ $wifi == *Home-Network* ]]
then
#Use special host file
cp -f /home/Documents/hosts.home /etc/hosts
else
#Use normal host file
cp -f /home/Documents/hosts.away /etc/hosts
fi
EDIT#200
It's stored in /etc/NetworkManager/dispatcher.d so it runs at startup.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
I have actually had the same problem. I'll be interested to see a solution. I used a workaround and sacrificed encryption when accessed locally. Everything works fine from outside the network though. I edited /etc/hosts to map directly to local ip rather than having the DNS request happen remotely to send me back to my network.
Example
127.0.1.1 hostname
127.0.0.1 localhost
Local.app.ip www.example.com
This doesn't fix anything it's just convenient since otherwise it defaults to https and then won't load.
One of the machines I had this problem on was a laptop which posed a problem if I changed the hosts file and then was outside my local network. It would still try to connect to a local ip. I solved this with a bash script I found online that changes the file based on if a certain wifi network is available. Just for fun here is the script.
wifi=`iwlist wlp3s0 scan | grep SSID`
if [[ $wifi == *Home-Network* ]]
then
#Use special host file
cp -f /home/Documents/hosts.home /etc/hosts
else
#Use normal host file
cp -f /home/Documents/hosts.away /etc/hosts
fi
EDIT#200
It's stored in /etc/NetworkManager/dispatcher.d so it runs at startup.
add a comment |Â
up vote
0
down vote
accepted
I have actually had the same problem. I'll be interested to see a solution. I used a workaround and sacrificed encryption when accessed locally. Everything works fine from outside the network though. I edited /etc/hosts to map directly to local ip rather than having the DNS request happen remotely to send me back to my network.
Example
127.0.1.1 hostname
127.0.0.1 localhost
Local.app.ip www.example.com
This doesn't fix anything it's just convenient since otherwise it defaults to https and then won't load.
One of the machines I had this problem on was a laptop which posed a problem if I changed the hosts file and then was outside my local network. It would still try to connect to a local ip. I solved this with a bash script I found online that changes the file based on if a certain wifi network is available. Just for fun here is the script.
wifi=`iwlist wlp3s0 scan | grep SSID`
if [[ $wifi == *Home-Network* ]]
then
#Use special host file
cp -f /home/Documents/hosts.home /etc/hosts
else
#Use normal host file
cp -f /home/Documents/hosts.away /etc/hosts
fi
EDIT#200
It's stored in /etc/NetworkManager/dispatcher.d so it runs at startup.
add a comment |Â
up vote
0
down vote
accepted
up vote
0
down vote
accepted
I have actually had the same problem. I'll be interested to see a solution. I used a workaround and sacrificed encryption when accessed locally. Everything works fine from outside the network though. I edited /etc/hosts to map directly to local ip rather than having the DNS request happen remotely to send me back to my network.
Example
127.0.1.1 hostname
127.0.0.1 localhost
Local.app.ip www.example.com
This doesn't fix anything it's just convenient since otherwise it defaults to https and then won't load.
One of the machines I had this problem on was a laptop which posed a problem if I changed the hosts file and then was outside my local network. It would still try to connect to a local ip. I solved this with a bash script I found online that changes the file based on if a certain wifi network is available. Just for fun here is the script.
wifi=`iwlist wlp3s0 scan | grep SSID`
if [[ $wifi == *Home-Network* ]]
then
#Use special host file
cp -f /home/Documents/hosts.home /etc/hosts
else
#Use normal host file
cp -f /home/Documents/hosts.away /etc/hosts
fi
EDIT#200
It's stored in /etc/NetworkManager/dispatcher.d so it runs at startup.
I have actually had the same problem. I'll be interested to see a solution. I used a workaround and sacrificed encryption when accessed locally. Everything works fine from outside the network though. I edited /etc/hosts to map directly to local ip rather than having the DNS request happen remotely to send me back to my network.
Example
127.0.1.1 hostname
127.0.0.1 localhost
Local.app.ip www.example.com
This doesn't fix anything it's just convenient since otherwise it defaults to https and then won't load.
One of the machines I had this problem on was a laptop which posed a problem if I changed the hosts file and then was outside my local network. It would still try to connect to a local ip. I solved this with a bash script I found online that changes the file based on if a certain wifi network is available. Just for fun here is the script.
wifi=`iwlist wlp3s0 scan | grep SSID`
if [[ $wifi == *Home-Network* ]]
then
#Use special host file
cp -f /home/Documents/hosts.home /etc/hosts
else
#Use normal host file
cp -f /home/Documents/hosts.away /etc/hosts
fi
EDIT#200
It's stored in /etc/NetworkManager/dispatcher.d so it runs at startup.
edited Mar 23 at 14:55
answered Mar 23 at 12:33
Josh Pickard
565
565
add a comment |Â
add a comment |Â
3
... and the error you get is...?
â Jeff Schaller
Mar 23 at 10:29
3
... and the steps you took to enable HTTPS were...?
â Jeff Schaller
Mar 23 at 10:30