Reputation: 311
I installed apache2 on ubuntu and I want to check that it works by accessing http://localhost/. The problem is I installed ubuntu(17.04) server, so there is no web browser, only the command line.
What can I do?
Upvotes: 16
Views: 111172
Reputation: 33
You can also port forward it... You can use ngrok service(just google it) and you can port forward your local host and open it on your own web browser. . . even on your phone..
./ngrok http 80
I think this should work and give you temporary address
Upvotes: 0
Reputation: 684
curl localhost (curl localhost:8080 if it's not port 80)
or
curl 127.0.0.1
or just test with
ping localhost
or download your index.html or something
wget localhost
Upvotes: 26
Reputation: 126
I recommend installing a browser for a command line like lynx ,Browsh.
Lynx is light-weight. Fast. An img element is always shown in their alt text. Browsh is a bit slower than Lynx. An img element is always shown ing(but as low quality as your command line can display).
I use different above depending on the purpose. If you just want to see the localhost is working well, use lynx. If you want to check your server working well and see details, use Browsh.
I hope my answer will help you. Any questions, google or ask me.
Upvotes: 4