I have been trying for hours to configure monit so I can access it remotely from a web browser from http://:2812 but it always times out. I have Nexus running on the same instance at http::8081 so I know basic connectivity works: My monitrc contains
set httpd port 2812
# use address localhost # only accept connection from localhost
allow localhost # allow localhost to connect to the server and
allow admin:monit # require user 'admin' with password 'monit'
allow 50.67.165.130 # remote host
Where remote host is where I am trying to connect from. Is there some other special magic to be able to access the monit httpd remotely?
Strange that this has to be so hard.
I have been through the same problem, I dont think the configuration likes comments right below the "set", try to put the lines without comments right below the "set". For example:
set httpd port 2812
allow admin:monit
Do also watch the log for errors:
tail -f /var/log/monit.log
I had the same issue for hours but finally solved.
In case you're using a firewell (ufw in my case), just add a rule to allow the trafic for the port:
sudo ufw allow 2812/tcp
2812 being the port you're trying to connect from, then http://your-ip-adress:2812
You have to configure Monit to allow remote access by adding your remote system IP address. We can add multiple IP addresses to access the HTTP interface from multiple systems as shown below.
set httpd port 2812 and
# use address localhost # only accept connection from localhost
allow localhost # allow localhost to connect to the server and
allow 50.67.165.130 # remote host
allow 50.67.165.135 # remote host
allow admin:monit # require user 'admin' with password 'monit'
Also, open the port 2812 by updating your firewall.
You have misses the and after the port number which is causing issues with your installation.
Also refer Install Monit On Ubuntu for complete details.
What you can also setup is
allow 0.0.0.0/0.0.0.0
but before you do, check also if you restricted connections to an address like localhost
Related
I've got an install of mmonit with various servers reporting into it. The monitoring is working, but trying to restart any servers results in it trying to contact itself (on localhost) and not the origin server IP.
I face a similar issue on ec2 via autoscaling, where the internal IP is assigned, not the public IP. Thus we get the same error, but it shows the AWS internal ec2 IP.
Our mmonit file is super simple, and doesn't mention localhost:
set httpd port 2812
allow xxx.xxx.xxx.xxx
allow monitcli:xxxxxxxxxxxxxxxx
In the monit host settings, it shows localhost, or the ec2 internal IP, and sure, I can manually override this, but that's a PITA.
Is there a way to push the correct external IP address from monit > mmonit in the config file?
Anyone have any insights here?
Use a proper hostname or ipaddress in the Monit monitrc files.
set httpd port 2812 and
use address 1.2.3.4
allow localhost
allow 1.2.3.0/24
The "use address" address used by Monit should be reachable by your M/Monit system. And the "allow" address mask should include the M/Monit system and the Monit system, you can add multiple address masks.
I am trying to make my Apache server publicly accessible. I opened port 80 in my router and my windows firewall , It didn't work. my router ISP is disabled. When I check port , i find it closed. THIS IS MY APACHE CONFIGURATION (WHAT I CHANGED IN MY HTTPD FILE:
<Directory />
Options FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
</Directory>
LoadModule rewrite_module modules/mod_rewrite.so
Is there any thing i should to solve this problem
THANKS IN ADVANCE
You need to configure port forwarding on your router in order to get all incoming traffic redirected to your local web server
Be sure you're using a static IP address when you added your pc server in your modem and you're using both TCP/UDP as an additional action to take care that we have connection access to all
Also be sure you're using Nat Port forwarding Not Port Mapping
and added your LAN IP not WAN IP
Some routers requires you to check a box to Enable Port forwarding after adding it
and I suggest you to check that now maybe you haven't noticed
Try programming a simple TCP or UDP server for open connection/listening test
otherwise try search and get one at GitHub or SourceForge then check port online with your Host IP Address while (listening)
But also take caution that you testing port for your specific protocol
If port is opened then the problem in your configuration and you have to re-read it backwards carefully
Else..then the problem in your router port forwarding configuration not in apache
and you have to check Lan-IP/Port-Start/End/Enabled etc..
If still having problems then please be more specific in your question and try
attaching screenshot of your port settings
Post your configuration
If you tried specific open source server program will be helpful to post the code
At the end i advice you to use Client/Server opensource script or program with a friend remotely
instead of checking online and that also if you have troubles finding one.
Try with this conf:
Name: local server
App name: HTTP
IP Address: 192.168.1.10 #your local server ip.
Port:
Start: 80
End: 80
Traffic Type: TCP
Installation of Spinnaker is done on an AWS ec2-instance. I want to access the docker from my local windows machine.
I have tried all these so far
1) Edit /etc/apache/ports.conf and remove change Listen 127.0.0.1:9000 to Listen 9000
1a) Add a reverse proxy for ports you wish to open in Apache
2) You may edit service files in /opt/spinnaker/conf to disable the bind to local host. Change localhost to domain name or 0.0.0.0
but none of them seem to work.
I was stuck on this too after having done the same things you mention. I got it working by also changing 127.0.0.1:9000 to *:9000 in /etc/apache2/sites-enabled/spinnaker.conf.
I am using proxy server address proxy1.xxx.xxx.xx to connect the internet using port number 8888 and when i want to connect to my localhost project it bring error
The requested URL could not be retrieved
but if I did not use proxy server it work correctly
how can I configer to connect with proxy server on. I am working in wamp server
here is my httpd.conf
ServerName localhost:81
HostnameLookups Off
The proxy can't see your local server because it only exists on your machine, and can't be accessed from the outside.
If you tell the proxy "connect to localhost", the proxy tries to connect to 127.0.0.1, which is its own machine, not yours.
If you want to do so, you must configure your webserver and router to accept remote connections on that port, and give the proxy your public IP address instead of localhost
Try to allow the proxy to by-pass local addresses and add your localhost to the list of exceptions. To do so using Chrome:
Go to Settings, Advanced Settings
Navigate to, Change proxy settings then LAN Settings
Click on the checkbox, Bypass proxy for local addresses as shown in the image below.
Check: Bypass proxy for local addresses
This should allow you to access your localhost from behind the proxy server.
Recently I've install Ubuntu 12.10 on my dev machine. also I've installed apache 2.2 &
Php 5.3.8 and Php 5.2.17 and MySQL. Everything works fine and I can browses my sites and projects via 127.0.0.1 & Localhost keyword and Hostname But I cannot access my sites or Apache web server via Local ip address (192.168.1.5).
I run this model on Laptop with Ubuntu 11.10 and can access via 192.168.1.x.
Do you have any idea about this issue please let me to know your XP in this case ?
thanks a million about your patient...
Farzam.
Perhaps your Apache is bounded to localhost only. Look in your Apache configuration file
(httpd.conf) for
Listen 127.0.0.1:80
and replace it with:
Listen 80
or
Listen *:80
Also check the Firewall settings, look for a the line below in the same file:
Allow from 127.0.0.1
and try changing it to:
Allow from all
You should replace the listen line as shown below:
Listen 0.0.0.0:80
Try:
sudo ufw allow from 192.168.1.5
I add Directory tag:
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
Windows Firewall did not have an exception for port 80.
Somehow IIS worked fine, but would not allow Apache port 80. Even disabling the Windows Firewall Service did not allow it.
Search Windows for "Firewall" and Create a new rule. Choose Port, enter 80, Call it: HTTP or whatever, Save. Restart Apache service.
in my case i work on nestjs and
previously i run my project on app.listen(3001) like this
first i change to this app.listen(3001,'192.168.xx.xx')
now i want to access my project on the another computer using ip on the network (LAN)
so it is now allow us to access any particular port after ip address
means if i access 192.198.xx.xx then i can access the address.
but if i append port like this 192.198.xx.xx:3001 then it not let me allow to access ip address so in this case i resolve my problem by run following cmd
sudo service ufw stop
sudo iptables -nvL
sudo iptables -nvL|less
sudo iptables -F
"Windows Firewall did not have an exception for port 80. Somehow IIS worked fine, but would not allow Apache port 80. Even disabling the Windows Firewall Service did not allow it.
Search Windows for "Firewall" and Create a new rule. Choose Port, enter 80, Call it: HTTP or whatever, Save. Restart Apache service." - This worked for me. After I enabled the ports 8080 on the firewall on Win Server 2012 (I use port 8080).