Ubuntu Servers :: Setup And Run Monit To Monitor An Apache2 Webserver?
Nov 11, 2010
I'm trying to set up and run Monit to monitor an Apache2 webserver, I want to be able to ensure Apache is running and if it's not have it restarted with an email alert sent out.
The monitrc (edited for relevance) looks like:
Code:
check system *server name*
if loadavg (1min) > 4 then alert
if loadavg (5min) > 2 then alert
I am planning to setup my own webserver using webmin, but from what i've read i apprently need two harddrives. one for the OS & one for the data. can i just partition my harddrive into two because i dont have another hdd lying around. i also just want to note that this is my first time trying to do something like this sooo I rly want to try to set up my own server . As a side note ill list the specs of the comp i plan to use as a server. Pentium 4 2.8ghz, 1gb DDR, 80GB 7200RPM HDD.
I am trying to set up a webserver using Ubuntu server with the EHCP plugin. I have it working and can access the EHCP page by using the IP address on my local network (192.168.0.4) So far so good. I then set uo a domain using the Domain add new(custom)from the sidebar. I provided the following info:
domainname - learner Panel - me Panel password - me2 Ftp user - DACL ftp password cullompton
Great I have now got a folder structure including httpdocs for that domain, I can also use filezilla to upload webpages etc to that folder, and have uploaded a page called index.htm One problem remains - what address do I type into the web browser to see the webpage. I've tried 192.168.0.4/learner which is what I expected to work.this will only ever be used as a web server on a local network, never on the WAN.
I've several webserver (ubuntu 10.10 x64) on which I would like to be able to send mail like newsletter.I don't need to recieve mail on these servers, I'm using google Apps for recieving mail for the hosted domains.There's sendmail installed by default on ubuntu server..Previoulsy I was using Exim4 configured to use gmail SMTP server to send technical mails (apticron, logwatch, cron mail), but it doesn't fit for newsletter type of mailing.On my tries, I've wanted to setup Exim4 (just for the sending part, no inbox, and not using gmail stmp) which result in:
sendmail marked a uninstalled but still there and working Exim4 complaining about not being able to bind the port 25.I've removed exim4 (/etc/init.d/exim4 were not deleted...)I've reinstalled sendmail.I got this warning on installof sendmail: /etc/mail/aliases: 5 aliases, longest 21 bytes, 91 bytes total
How do I restore a working sendmail? What do I need to do so that mail sent from these servers aren't marked as spam? (not considering the content of the mail, but the server that send the mail) I see that some company used some specialized company like "grosbill.emailingoptin.com for grosbill.com" Should I specialize one domain for all newsletter ?
I have a perl program that I need to an eye on so it run 24/7 and restarts if it stops at any time. I have Webmin installed and I am looking into Mon but it seems it only monitors services like "httpd" and "smtp" rather than a file.pl file which runs. Actually the file creates a pid.log in /var/log/ which has the PID number in it.
Since Monit doesn't come on webmin I am not sure what I need to put in it's config file to monitor my file.pl.
I wanted to setup a local Apache2 server for some programming and testing. I installed and got Apache2 working with PHP, MySQL and all works fine. Now I wanted to add an additional directory to somewhere in my /home. And that's where things went wrong. I went to edit /etc/apache2/sites-available/default. This is it:
Code: You don't have permission to access /po/ on this server. So I go to the logfile; which says this: Code: [Sat May 08 16:43:51 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /po/ denied
I tried a lot of stuff using chmod and chown, but all to no avail. I tried to change the ownership of the /home/name/web to root, and to www-data, I changed file permissions to allow executing the files.
It would seem MySQL and VSFTP no longer create pid files and monit requires a pid file to work. Is there any way to force MySQLD and VSFTPD to use pid files or am I out of luck?
I just want to be able to send emails through my webserver, setup. I couldn't find a dev forum - so thought i'd post here. I'd like to be able to send emails (form my localhost setup) to and from my global client, namely: ( ***@yahoo.com), using PHP and Apache. A snippet from my php.ini file looks like:
Code: ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). ; http://php.net/sendmail-path sendmail_path = /usr/sbin/sendmail -i -t sendmail_from = example@yahoo.com
Now, I never could get this working in Windows, let alone Linux. I could do with it working though.
I posted this question a while ago but haven't had any luck getting it answered so I reworded everything to make it more clear. I started an Ubuntu web server on an old work laptop. The purpose of this server is to host a small file-sharing site, a forum, and a wiki. I have no prior experience with command line Ubuntu but am trying to figure this all out.
So far Ive setup the LAMP server, so apache, mysql, and php are installed. Ive also installed phpBB3 and Mediawiki. Both phpBB3 and Mediawiki are able to open from inside my LAN. I also have SSH setup and am able to use putty to manage the server from inside my LAN. Mediawiki runs slow internally but this is a secondary concern.
Externally to the LAN I can access the webserver using SSH(but sometimes it is too slow for anything that opens up such as nano or the SQL password prompt to display and the connection drops). I can also browse to the site and see the default apache welcome message. But I cannot open the mediawiki or phpbb site. Both will sit indefinitely and not open. The access log on the server shows that the request is being passed through though.
how to create an entire server from scratch using a minimal install. I know Ubuntu Server 10.04.1 comes with packages that can be included during install but for the sake of learning I only installed SSH access.
I was able to get Apache2, MySQL, PHP5 installed and running fine. What I'm trying to do next is setup DNS so I can point fragdata.com to my Ubuntu server and have other people see my test site.
I have registered the nameserver ns1.fragdata.com with my IP and updated DNS in my registrar. I followed the tutorial but "dig fragdata.com" gives me the following:
In order to pass PCI compliance I need to upgrade our webserver from php 5.3.5 to php 5.3.6. I found this: [URL] however it doesn't seem to work. My best guess is due to the fact I have 64bit server. Is there something else I can do without going through a compile?
This is a triple-monitor setup with two video cards, where the mouse pointer gets "stuck" if it tries to cross from one video card to the next one. It worked correctly in openSUSE 11.2 and doesn't work in openSUSE 11.3 with the same xorg.conf. This is a 64-bit openSUSE 11.3 with xorg 7.5-11.3 (the openSUSE prepackaged version). I've already tried NVidia drivers 256.53-16.1 (the openSUSE NVidia repository version) and 260.19.12 (the latest off of the NVidia website).
This is the same xorg.conf that I used successfully in openSUSE 11.2. I tried a new automatically generated xorg.conf using nvidia-settings and it had the same problem. This forum won't let me upload the relevant files, but here: [URL] is a tar-ball with my xorg.conf, Xorg.*.log, /var/log/messages, and the NVidia debugging output.
I have two servers on my network One with ubuntu 9.10 server And one with openSUSE 11.2.The ubuntu server is my webserver and runs phpsysinfo and my website. On the openSuse server i have a webbased application and some files that i want people to be able to reach by using mydomain.com wich points to my ubuntu server. Is there any way to do this?
I followed the tutorial found here [URL] but when I try to access [URL] I get the following: Code: Secure Connection Failed An error occurred during a connection to www.mydomain.com. SSL received a record that exceeded the maximum permissible length. (Error code: ssl_error_rx_record_too_long) Not sure what I might have done wrong... I have retraced all of my steps and I don't believe I missed anything.
So in my first ever attempt at Linux (and servers) I was able to set up a working web server that is visible from outside my network and created a simple PHP page thanks to this tutorial. I installed MySQL and have some experience with MS SQL but have no clue how to get started setting up databases and writing procedures in MySQL. I know all the syntax about writing scripts for MySQL (assuming it's the same as SQL) but I don't know how to get started. Do I need to be on the web server or can I do it remotely? Is there a front end GUI that everyone uses?
I upgraded webserver to new ubuntu server 10.04 (x86-64). After upgrade the increased load from 0,3 to 1,4. On webserver running phpbb, which generating slow quieres, which not before upgrade to lucid. HW conf: Intel Core i7, 8GB ram, WD Raptor 10k rpm. Week17 upgrade to new version.
Ok let's say I have Apache Webservers on 2 different machines within my network, I have http://outterABC.com setup at dyndns.org to point to my modem at home, and my router forwards Port 80 to the ServerA Machine (i.e. 192.168.0.3). I can access my webpage I setup for the Server A Machine.
But what I want to try and do is somehow access my ServerB machine's website that is on my same network. I tried something like this http://ServerB.outterABC.com and the apache page came up with something like the page wasn't available. I want to access the content of the ServerB website, but because I have only one router, i can only forward Port 80 site traffic to my ServerA machine's website. I'm sure it's a different syntax I should use but i'm just not sure what I should enter to bring up the apache root web page for the Server B website via http://outterABC.com
I tried setting up DNS A records on ServerA, but I don't think it will work with what i'm trying to do above.
I'm trying to run Web server (nginx, does not really matter) "behind" VPN tunnel (i.e., on VPN client - the idea is that Web server is available at VPN endpoint IP on VPN server). Stock Ubuntu 9.10 Server with stock openvpn 2.1. No network changes done, only ufw is enabled and IPv6 is switched off. I need this box to be available at main IP address, no default route for VPN tunnel.
Tunnel itself works nicely, no problems at all. Hand-made static routes work via tunnel just fine. Problem is in-going traffic - I can see that it at least comes via tunnel (via OpenVPN debug), but is blocked (or dropped) by firewall or kernel. As far as I know, specific VPN server does not filter anything and is used for running Web servers on other IPs. I think I might need to set up some sort of IP forwarding for tap0 device to localhost - but don't really know where to start.
Tried disabling firewall, making Web server listen on all IPs (from localhost to VPN tunnel) - no luck. The box is in another country and KVM will be time and money, so I really don't feel like experimenting. openvpn.conf (IPs are obscured, non-relevant options removed, based on recommended config for that server):
Set up my own web server hosted at home that I can use a genealogy program such as GRAMPS or PHPGedView with so that family members and I can store, view and upload information online viewable only to other family members.I have a old Dell server from work to use as a server (I know specs are helpful but don't have them at the moment.)I know that there are web hosting sites that this can be accomplished with easier and cheap but I mostly want to use this as an opportunity to learn.I am extremely new to Linux but the love the power it offers as well as it's philosophy.So far I've installed Ubuntu 10.04 Server on the machine.
I installed Apache, MySql, PHP and various other things with it.I got all the way through but have some errors with ISPconfig set up and some when I reboot.My main question at this point is, is this the best approach for what I want to do? And then once it's set up where do I go to learn how to use my system.
I have small home atom-server on netbook (with damaged screen) with Intel Atom N450 1.6Ghz CPU and 1GB of RAM. I am looking for web server, that would not eat much resources when hosting wordpress blog (up to 50-100 readers at once in veeeeeery far future) - posts in most cases will be only text based, without big images or archives (I'm not sure if it is important).The brain of my atom-server is latest 32-bit ubuntu server, without X's, I access it from ssh console only. It is already:
- proxy gate for my internal network (squid) - my gmail backup/IMAP (dovecot & getmail) - file server for my internal network (samba)
I want to backup my apache website using tar. I want to make sure all the permissions and such stay the same so that if I restore a website, it's ready to go exactly as it had been.I am using the following command and would like to know if there is anything else I should neeed to do?
tar --xattrs cvzf backup.tgz /path-to-webserver-files
Now my other question is since tar doesn't store absolute paths, when I run the restore I have to be in the root directory? In another words if I run the command in a user directory will tar do something retarded like encode the paths as ../path-to-webserver or will it just be path-to-webserver so that when I run the restore from the / folder it will automatically go into the right place?
I'm completely new to this whole hosting on linux thing. I'm using apache2 and have everything setup as if I was doing it on a windows machine but when I navigate to the site via URL it displays the source code as plan text and thats all I see. I'm running openSuse 10.3.
I'm trying to setup apache2 to drop a core file when it crashes. I know that you need to set the CoreDumpDirectory directive in /etc/apache2/apache2.conf and run "ulimit -c unlimited" from the command line (and restart apache after the ulimit command). But, on a reboot, even though the output of "ulimit -a" shows unlimited, apache2 will not create a core dump file unliess you set ulimit -c unlimited again and restart apache2. There must be a way to configure apache2.conf or something so that ulimit -c unlimited is set prior to apache2 starting, no?
I've tried to copy my files from Xamp httdocs in windows to /var/www/html, but I can't paste the file, what should I do so I can paste the files ? I have logged in as a root..
I have a process that runs without creating a PID. I know how to use pidof... So I use it to create a pidfile containing the process number. The thing is that monit checks that the file exist... That works fine... But when I kill the process manually... leaving the pidfile, monit doesn't see this... And the process doesn't restart. The process is flashplayer... running an swf in full screen.