Connect linux computers to CentOS websever - linux

i would like to ask on how other linux computer can connect to my CentOS web Server.Btw, I'm using virtual box on those CentOS. I tried googling it but i giving me hard time to find a good answer, so im trying to ask here if someone knows about it. Advance thank you!

It depends on how you are trying to access the web server.
If you are simply trying to access a website you have on the server, then you have the following options:
If the ip address of the server is registered with DNS then it's pretty much straightforward.
If the ip address is not registered, etc. and it's under the same network as the other linux computer then you need to know what ip address the CentOS web server has which you will use to access via a web browser.
If the web server is located in another network, then you will have to look into port forwarding.
If you are trying to access the web server to do anything else but accessing a website (e.g. installing software, doing configuration, etc.) then you have the following option(s):
setup SSH to securely access the server remotely.

Related

How to make my lamp server accessible by others?

I have downloaded the lamp stack server. I am using centos 7. When I put localhost:81/filename it is openeing but it is not working when viewed from other system.
My lamp uses port 81 so I changed Listen 81 in the httpd.conf and in the virtualhost as <virtualhost*:81>. But it is not working. Can anyone help me out this?
Are the two systems already connected to each using a network device like a switch or router?
To share your server with another system , you must first connect both systems to the same network. After which you need to get the IP address assigned to the system hosting the server. On linux, you can type ifconfig command to get this address from the server system. Then enter address in other system like:
http://192.168.1.128/filename
to view the resource.
If you have a wireless wifi box or router, you can use it to connect both systems. Just switch on the box without connecting to the internet.
Connect both systems to the router. Then follow the steps cited above to connect both systems.

how to link local IP Address to a domain name in local network, so website can be accessible to any device using the domain name?

I am a NOOB to programming and networking so please forgive me for any mistakes.
I have searched on stack,google for my problem but the solutions
i found didn't went well with me and so please do consider answering my question
even if you consider it is simple or duplicate question.
My Problem - I have a nodeJS server built using express and it can be accessed on
address http://192.168.209.239:8001/ now i want to access server using domain names like normal website say i want to access the server using http://myserver.app/
found Solutions - i found about DNS but i was not able to set it up, then i found that editing the etc/host file can solve this but domain name was only working on my laptop where the app is running, if i connect my phone to same network* and when i type the domain name it does not work.
I found about mDNS. but i was a very old post which told we can use Apple Bonjour but it is not working as i learned that Microsoft has done some implementation of mDNS
so make Bonjour work disable mDNS in registry and i am not willing to do that.
What i ask - please give me step by step guide how to stepup DNS or mDNS on my machine
so if any device connects to my network it can access the NodeJS app thought its browser using domain URL http://myserver.app/
I am using
nodeJS#16.13.2,
express#4.17.2,
Windows 11 version 21H2 build 22000.376
My Network is like I have connected my mobile hotspot to laptop
and any new device to connected to hotspot so may my mobile is kind of a wifi router.
if a different laptop connects to my hotspot i should be able to access the website using the domain name. myserver.app
My Phone is using Android 11
and please do consider
I do not want to use any online DNS providers like easyDns or AWS
i want a local solution which i can run on my laptop
Ideally you need to DNS server for this : but its wont work with dynamic IP as your machine ip can change after reboot
You can add domain as host entry on each machine : this will not work with mobile and also need to change ip as your machine / server ip change
If you have static ip , just go for any dns service provider easydns , aws and as its inetrnall ip will work for all devices which are in network
Found This may work for y https://www.noip.com/support/knowledgebase/how-to-configure-ddns-in-router/
Starting with Android 9 Pie it is possible to change DNS globally, provided they support TLS. Just go in
Settings → Network & internet → Advanced → Private DNS

How do I access my node.js website from an external device?

I have a node.js website running on my Ubuntu VM. I can access it both from the host and the VM. But if I try http://192.168.10.120:80, from an external device connected to the same network over WiFi, it doesn't work.
What I need to do to make the web site accessible to external devices on the same local network?
I've been googling this for days, and still can't find an answer...
If the host is Windows, there's two things you'll have to do. One is setting up port forwarding in your VM settings. If you're using Virtual Box check this out. Also, depending on your internal networking setup, you may need to allow inbound connections to port 80 through Windows Firewall. Check out this article from Microsoft. The process hasn't really changed since Windows 7 so it should be the same on 8 or 10.
As a side note, security through obscurity sucks but I still wouldn't recommend using port 80.

How do I host a NodeJS http web server on a raspberry PI/or any linux based PC

I've seen people host Apache servers on raspberry PI's and of course on regular computers. I do not wish to or rent a VPS and thought it would be best to set one up on my Raspberry PI 2 B:
(1gb ram/32gb disk/1ghz on overclock)
What is the proper way of setting up a NodeJS http web server on a computer? Can you link me to a tutorial if one exists(Couldn't find any).
I was also wondering if I would be better of renting a VPS with recurring costs and lack of customization/control , or on a working dedicated PC. Keep in mind that I wish to practice some dev ops work over multiple PI's(ex. Chef).
I need this server to be accessible through the internet through an ip or domain. How do I go about setting that up? (I have domains)
Update: I wrote a blog post on this subject.
The tutorial goes through the full installation process. Click the link below
Yes, You can use raspberry as your VPS or dedicated server. Just assign static IP address(You need to buy) to your Raspberry and then point your domain name to that static IP address.
Few links below that will be helpful for you,
https://www.modmypi.com/blog/how-to-give-your-raspberry-pi-a-static-ip-address-update
https://in.godaddy.com/help/point-your-domain-name-to-a-server-19116

can't ping avahi alias from windows over LAN but can from other linux VMs

Context: i've set up a vm server for GIS testing and dokuwiki on the domain root. I'd like to serve the gis web apps on a subdomain so that dokuwiki url renaming will never conflict (and it just feels cleaner). I thought i had it solved with avahi-aliases, but then discovered...
Problem: I can't reach the subdomain from any windows pcs on the LAN. Linux VMs connect just fine. Am i trying the impossible or just doing it wrong? (i'm a DNS noob) Why would Linux find the subdomain but Windows not, even on the same LAN??
Setup:
i can't change anything on the corporate routers/servers.
VMs are on different PCs on the same corporate LAN.
VM1 (virtualbox, hosted on windows PC1): Mint 13
VM2 (virtualbox headless server, hosted on windows PC2): ubuntu server 12.04, LAMP, samba, avahi, avahi-aliases.
primary domain: vm2.local
subdomain: gis.vm2.local (configured in apache and avahi-alias)
What works:
I can reach vm2.local AND gis.vm2.local from vm1 (via ping and browser).
I can reach vm2.local from any windows pc on LAN (via ping browser).
What doesn't work: I cannot reach gis.vm2.local from any windows pcs on the LAN.
Any ideas or advice is appreciated!
Sounds like either a firewall issue or Apache/IIS (whatever is hosting your web app) isn't listening to all traffic (If you are actually sharing networks). Try a traceroute/tracert from the machines to the destination and see what paths they take. It's a little hard to troubleshoot without actually seeing how your network looks.
You can also test if your hostname resolves by trying a ping on the PC's having issues.
If it says "Ping request could not find host . Please check the name and try again" - It's a DNS issue and you can address it quickly by providing the IP of the machine with its hostname in %WINDIR%\system32\drivers\etc\hosts

Resources