Saturday, May 18, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 12406  / 2 Years ago, sat, june 25, 2022, 4:23:45

I'm really confused how to make my Apache2 web server public. I've setup everything and when I type localhost:80 it comes up properly.
But, I need very clear and detailed instructions on how to make it public! And also have it used by its alias which I set to pcpcpc12.com



[EDIT]



Output of /var/log/apache2/access.log



127.0.0.1 - - [16/Mar/2016:20:04:23 +0000] "GET / HTTP/1.1" 200 3594 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"
127.0.0.1 - - [16/Mar/2016:20:04:23 +0000] "GET /icons/ubuntu-logo.png HTTP/1.1" 200 3688 "http://localhost/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"
127.0.0.1 - - [16/Mar/2016:20:04:24 +0000] "GET /favicon.ico HTTP/1.1" 404 498 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"
127.0.0.1 - - [16/Mar/2016:20:04:24 +0000] "GET /favicon.ico HTTP/1.1" 404 498 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"
127.0.0.1 - - [16/Mar/2016:20:10:34 +0000] "GET / HTTP/1.1" 200 661 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"
127.0.0.1 - - [16/Mar/2016:20:10:34 +0000] "GET /icons/blank.gif HTTP/1.1" 200 430 "http://localhost/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"
127.0.0.1 - - [16/Mar/2016:20:10:34 +0000] "GET /icons/folder.gif HTTP/1.1" 200 507 "http://localhost/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"
127.0.0.1 - - [16/Mar/2016:20:10:40 +0000] "GET /pcpcpc12.com/ HTTP/1.1" 200 3594 "http://localhost/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"
127.0.0.1 - - [16/Mar/2016:20:11:31 +0000] "GET /pcpcpc12.com/ HTTP/1.1" 200 732 "http://localhost/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"
127.0.0.1 - - [16/Mar/2016:20:11:31 +0000] "GET /icons/back.gif HTTP/1.1" 200 498 "http://localhost/pcpcpc12.com/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"
127.0.0.1 - - [16/Mar/2016:20:11:31 +0000] "GET /icons/blank.gif HTTP/1.1" 304 178 "http://localhost/pcpcpc12.com/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"
127.0.0.1 - - [16/Mar/2016:20:11:31 +0000] "GET /icons/folder.gif HTTP/1.1" 304 178 "http://localhost/pcpcpc12.com/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"
127.0.0.1 - - [16/Mar/2016:20:11:42 +0000] "GET /pcpcpc12.com/public_html/ HTTP/1.1" 200 280 "http://localhost/pcpcpc12.com/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"
127.0.0.1 - - [16/Mar/2016:20:14:26 +0000] "GET /pcpcpc12.com/ HTTP/1.1" 200 734 "http://localhost/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"
127.0.0.1 - - [16/Mar/2016:20:14:26 +0000] "GET /icons/blank.gif HTTP/1.1" 304 178 "http://localhost/pcpcpc12.com/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"
127.0.0.1 - - [16/Mar/2016:20:14:26 +0000] "GET /icons/back.gif HTTP/1.1" 304 178 "http://localhost/pcpcpc12.com/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"
127.0.0.1 - - [16/Mar/2016:20:14:26 +0000] "GET /icons/folder.gif HTTP/1.1" 304 178 "http://localhost/pcpcpc12.com/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"
127.0.0.1 - - [16/Mar/2016:20:14:44 +0000] "GET / HTTP/1.1" 200 280 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"
127.0.0.1 - - [16/Mar/2016:20:51:41 +0000] "GET / HTTP/1.1" 200 548 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"
127.0.0.1 - - [16/Mar/2016:20:51:42 +0000] "GET /favicon.ico HTTP/1.1" 404 498 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"
127.0.0.1 - - [16/Mar/2016:20:51:42 +0000] "GET /favicon.ico HTTP/1.1" 404 498 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"
127.0.0.1 - - [16/Mar/2016:20:51:45 +0000] "GET /pcpcpc12.com/public_html/index_two.html HTTP/1.1" 200 505 "http://localhost/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"


Output of error.log



[Wed Mar 16 19:18:41.713986 2016] [mpm_event:notice] [pid 4282:tid 140223239657344] AH00489: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
[Wed Mar 16 19:18:41.714259 2016] [core:notice] [pid 4282:tid 140223239657344] AH00094: Command line: '/usr/sbin/apache2'
[Tue Jan 01 00:00:48.990306 2013] [mpm_event:notice] [pid 1316:tid 140375846848384] AH00489: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
[Tue Jan 01 00:00:49.019771 2013] [core:notice] [pid 1316:tid 140375846848384] AH00094: Command line: '/usr/sbin/apache2'

More From » apache2

 Answers
5

when you "set the alias to pcpcpc12.com", others will not be able to view it unless you create a public DNS record. this will require knowing your public IP address. you can just google "what's my public IP"



If you own pcpcpc12.com, registered through godaddy or someone, then they should have an interface for you to create an A host record, use your public IP for that.



If you don't own the domain, then others can still reach your website by typing your public IP address in their browser, for example, http://192.168.0.1/ (your public IP will not start with 192.168)



since you mentioned in the comments that you are using a TalkTalk home gateway router, I'm assuming you're using a residential internet connection. Depending on your ISP, such as Cox (my beloved ISP), they may choose to block your public http port as an incentive to get you to upgrade to a costly business internet connection.



You can check by going away from home somewhere on some other network, and running network map. Install the utility sudo apt-get install nmap and then run the command nmap -Pn -p 80 192.168.0.1 and change the 192.168.0.1 IP to the public IP from step one. With luck, you'll get an open scan like this:



Starting Nmap 6.40 ( http://nmap.org ) at 2016-03-22 22:17 CDT
Nmap scan report for 192.168.0.1
Host is up (0.0028s latency).
PORT STATE SERVICE
80/tcp open http

Nmap done: 1 IP address (1 host up) scanned in 0.13 seconds


Otherwise, you'll get a filtered scan like this:



Starting Nmap 6.40 ( http://nmap.org ) at 2016-03-22 22:19 CDT
Nmap scan report for 192.168.0.1
Host is up.
PORT STATE SERVICE
80/tcp filtered http

Nmap done: 1 IP address (1 host up) scanned in 2.58 seconds


In this case, then others can still reach you on a non-blocked port. 8080 is a popular choice. you will need to adjust the settings in your router to port forward map your incoming external port 8080 to your internal port 80 of the internal IP of your server. You will only have one public IP, but you will have a different internal IP for every device on your network. Internal network IPs usually start with 192.168. or 10. You can find out your internal IP by running the terminal command ifconfig



Once you have that setup correctly, then the world will be able to reach your site at http://192.168.0.1:8080, again making sure to use your public IP and not the 192.168.


[#16199] Monday, June 27, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
umplegitimat

Total Points: 137
Total Questions: 126
Total Answers: 118

Location: Saint Pierre and Miquelon
Member since Sat, Aug 21, 2021
3 Years ago
;