how to configure a port for a custom web server in oracle linux server - http

I'm developing a web server that I had to do from scratch, it works well locally and now I have to implement it on an oracle linux server to be accessed, for example, 123.456.789:3000 on that specific port.
my question is how do i correctly configure the port for that, configure the port in the firewall as follows
firewall-cmd --add-port=3000/tcp --permanent
firewall-cmd --reload
prepare the web server but it is not accessed, I do not know much about this area in particular, the server works like express.js for example
edit: I do not have access to the server configuration console as such

Related

LetsEncrypt Install on a Raspberry Pi web server

I've created a web server on my Raspberry Pi 4 and using it for a web project that I'm currently working on as well as future website projects. Currently, I'm running on Pop OS Linux distro on my main laptop and SSH to the Raspberry Pi running as a web server. I'd like to install the letsencrypt SSL on the webserver. I've found some tutorials on a Google search and have had no luck with the installation of certbot. I'm currently running the Nginx web server on the Raspberry Pi.
I have changed some of the settings on the /etc/Nginx/sites-available & sites-enabled and still no luck with the SSL running on the webserver. Are there any other suggestions or tips that anyone can throw my way to get this web server installed with a secure socket layer of encryption? I'm currently running the web server on my Raspberry Pi's IP Address. Maybe I need to change it to an actual domain name beforehand and see if that works?
When I run:
sudo systemctl status nginx
It returns as active. Which is good. Any suggestions?
You should go for following the steps, serially:
You need to register a domain name with a official DNS (Domain Name System) Register, e.g. NameCheap, Google Domains, Go Daddy.
Install certbot following instructions on Let's Encrypt tutorials all SSL/TLS certificates will be installed automatically, (assuming that you're not requesting a wildcard certificate, I too recommend not doing so as it's a hassle in getting a wildcard certificate).
Make sure all ports are correctly forwarded to the Raspberry Pi and that there is no firewall interfering with the ports 443 and 80 and make sure that your ISP is not blocking them whatsoever, since Let's Encrypt needs to verify that your domain name and website exists and is accessible.

When I run my daemon the service is a http proxy instead off http

I am currently running a service with systemctl, and it is running as an http proxy, not normal http. Is this something that Google does? I am using port 8080 and I can't connect to it via http. My daemon is using port 8080, while using the type http-proxy (I am seeing this with the command nmap -sV -sC -p 8080 35.208.25.61 -vvvv -Pn). Instead, I want the daemon I'm running (wings.service) to use http, so it can use that type of connection to connect to my panel.
The panel is part of a piece of software along with the daemon, it's called pterodactyl. Anyways, I have tried everything on what to do, and I think this problem that I am addressing is the problem that causes dysfunction on my panel. I might just have to move to a different service to host my bots for discord.
Let me know if there's anything I can do to fix this.
As per I can understand you are unable to access the panel via web URL.
Pterodactyl web server can be installed using NGINX or Apache web servers, and both web servers by default listed on port 80 based on Pterodactyl web server installation guide, so you must enable HTTP port 80 traffic on your Compute Engine VM instance
The default firewall rules on GCP do not allow HTTP or HTTPS connections to your instances. However, it is fairly simple to add a rule that does allow them following this steps:
1.-Go to the VM instances page.
2.- Click the name of the desired instance.
3.- Click Edit button at the top of the page.
4.- Scroll down to the Firewalls section.
5.- Check the Allow HTTP or Allow HTTPS options under your desired VPC network.
6.- Click Save.
Note: The Pterodactyl panel and Daemon installation are not the same for each operating system, if after checking the VPC firewall rules on the VM settings and also the status of the web server in the instance (NGINX or Apache) you still cannot access your panel, please provide a step by step list with all commands you followed to complete the installation, including the OS version you used.

ngrok to work for a site located in different IP( i.e. remote server)

I want to run a site which is on my different server with a host name.What can be the ngrok syntax.I tried running ngrok http -host-header=abc.com 80.But it shows tunnel not available.What can be the syntax for running a website which is located on remote server from my local machine.
It sounds like you are looking for the feature of forwarding to servers running on a different machine.
Take a look at the documentation here:
https://ngrok.com/docs/secure-tunnels/non-local (updated)
You should just be able to specify a network address and port instead of just a port with this command:
ngrok http 192.168.1.1:8080

IBM HTTP Server, routing calls to Websphere

Something I have been struggling with for a while, but I'm not able to come up with a proper solution.
This is the situation:
Host 1 - IBM HTTP Server, Customization Toolbox and WAS Plugins
Host 2 - WAS + Application
These are the steps I executed to configure the plugin and propagate it from Websphere:
1. I used the Customization Toolbox, selected the correct WAS Plugins directory and created a new Web Server Plugin
2. I copied the new configureSERVER.bat to my Application Server on Host 2, and configured the current profile.
3. On Host 1, I created an Administrator account.
When I open the WAS-console on Host 2, I can see the actual Web Server, so that went ok. When I select "Generate plugin" and "Propagate Plugin", I get no errors. I checked the HTTP Server, and indeed, my plugin-cfg.xml is neatly created and exists.
To make sure everything is all right, I opened the http://HOST1/snoop on Host 1 and I saw the correct diagnostics. So far, so good.
After that, I deployed my application, which runs on port 9044. However, this application runs on HTTPS, so we need to make sure that the IBM HTTP Server accepts SSL connections. I generated my own selfsigned certificate, imported it in the httpd.conf and restarted the server. (If someone is interested, I'll put some more details on how to do this).
Now, when I open https://HOST1/snoop I can see the diagnostics, which is good news. It means it accepts connections on https and reroutes it to Host 2. But the problem is, I have no idea how to access my application, which is running on port 9044.
Something that puzzles me is the details when I run the snoop-servlet.
When I run it via http (so without SSL), this is the output:
Local address XXX.XXX.XXX.XXX
Local host XXXXXXXXXX
Local port 9080
That is correct, because the port on Websphere is 9080 for that particular servlet. However, when I open https://HOST1/snoop (so, via SSL), this is what being generated:
Local address XXX.XXX.XXX.XXX
Local host XXXXXXXXXX
Local port 9044
So, apparently, 443 is being rerouted to 9044 on the second host, but the Snoop servlet runs on 9443, not 9044 (which is my application). But, then I wonder, why can I access the servlet, if it is running on another port.
So, if there's anyone who can give me some guidance, that would be nice.
This is the VHOST:
<VirtualHostGroup Name="default_host">
<VirtualHost Name="*:9080"/>
<VirtualHost Name="*:80"/>
<VirtualHost Name="*:9443"/>
<VirtualHost Name="*:5060"/>
<VirtualHost Name="*:5061"/>
<VirtualHost Name="*:443"/>
<VirtualHost Name="*:9044"/>
</VirtualHostGroup>
Event though you have 2 ports (I'm assuming you created custom transport chain and assign 9044 port to it), you added that port to default_host, which is visible in the VirtualHostGroup in the plugin. Your application is probably mapped also to the default_host, so it is available using all ports - 9080, 9443 and 9044. Second transport should be visible in the plugin config for your server with port 9044. Since it is also ssl transport plugin could choose that one to route request to your server. There is no way to force plugin to use specific port for communication to WAS for given application.
However you didn't specify what you actually want to achieve? Since your app should now be available via https.

Setup an HTTP Server Side Proxy or Tunnel Server

I have a Nexus 7 connected to our Wifi Network. I cannot root this device so I can't edit the hosts file. It can connect to the XAMPP Web Server on my Desktop computer.
On my Desktop computer I have a VM, configured via Vagrant and it has a Private Network so only my Desktop (Host) can access it. This VM has my development environment and Web Server running on port 8080. I can connect to this VM from my Desktop browser using only the hostname http://nick:8080/. I have had to edit the hosts file on my Desktop to map nick to the VM IP (192.168.33.10). http://192.168.33.10:8080 doesn't work because of the VM's Web Server config.
So I can easily test native mobile devices, I'm trying to find a way of tunneling or proxying the requests from XAMPP (or another Server) to the VM.
My N7 can access XAMPP so I'm thinking can I set XAMPP up as a Proxy or Tunnel Server which can communicate to the VM.
N7 -> Proxy/Tunnel Server (XAMPP) -> VM.
I need the Proxy/Tunnel server to maintain the header http://nick:8080 as http://192.168.33.10:8080 doesn't work.
Can I do this using Apache config or is there another utility server that can help?
Thanks,
Nick
You may be able to achieve what you want using one of the following depending on how you are actually requesting your application:
If you want to map http://nick:8080 to http://192.168.33.10:8080 you can try adding this in your xampp apache config :
ProxyRemote * http://192.168.33.10:8080/
If you are using a subdirectory on eg http://nick:8080/mobile then try:
ProxyPass /mobile http://192.168.33.10:8080
ProxyPassReverse /mobile http://192.168.33.10:8080
As an alternative you can try using a rewrite rule:
RewriteRule ^/mobile(.*) http://192.168.33.10:8080/mobile$1 [P]

Resources