Apache2 virtualhost 403 forbidden?
Question I'm running ubuntu 13.04 64bit on my desktop, I installed Apache2, MySQL and PHP etc.
I wanted to have my web root in /home/afflicto/public_html instead of /var/www.
So I went along with this guide:
http://www.maketecheasier.com/install-and-configure-apache-in-ubuntu/2011/03/09
(I did everything from "configuring different sites") as I like the solution more.
Here's what I did:
Installed Apache2, MySQL etc..
copied /etc/apache2/sites-avaliable/default to /etc/apache2/sites-available/afflicto. Then edited it, it now looks like the following:…
Read more ⟶Monit daemon - error connecting to the monit daemon
Question I installed monit and tried to check the status using below command.
monit status
But end up with below error.
monit: error connecting to the monit daemon
How can I fix this?
Answer edit vim /etc/monit/monitrc, starting from line 118 and uncomment below lines
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
sudo monit reload to take affect…
Read more ⟶Create a Superuser in postgres
Question i'm looking for setup a Rails Environment with Vagrant, for that purpose the box it's been provisioned through bash shell method and includes among others this line:
sudo -u postgres createuser <superuserusername> -s with password '<superuserpassword>'
but i'm getting a configuration error, createuser: too many command-line arguments (first is "with")
can you help me with the correct syntax for create a Superuser with a password. Thanks
Answer Do it in a single statement within psql:…
Read more ⟶In R, using Ubuntu, try to install a lib depending on GMP C lib, it won't find GMP, but I have GMP installed
Question I want to install the Rmpfr library of R, so I type within R:
install.packages("Rmpfr")
This package requires the GMP C library to be installed, which in Ubuntu can be installed typing on the terminal
sudo apt-get install libgmp-dev
So, after I try to install Rmpfr library in R, I receive an error message containing
configure: error: GNU MP not found, or not 4.1.4 or up, see http://gmplib.org
The problem is, I already have GNU MP installed, and its version is 5.…
Read more ⟶pip3 TypeError: 'module' object is not callable' after update
Question I am new in Python, I wanna install Jupyter Notebook in my console I enter the following:
pip3 install --upgrade pip after that I have a error to use pip3 install other library, the console print: File "/usr/bin/pip3", line 11, in <module>
sys.exit(main())
TypeError: 'module' object is not callable
I don't know what I have to do. I use sudo autoremove python3-pip after that I use sudo apt install python3-pip…
Read more ⟶What is the advantage of using supervisord over monit?
Question We have a custom setup which has several daemons (web applications + background tasks) running. I am looking at using a service which helps us to monitor those daemons and restart them if their resource consumption exceeds over a level.
I will appreciate any insight on when one is better over the other. As I understand, monit spins up a new process while supervisord starts a sub process. What are the pros and cons of this approach?…
Read more ⟶How can I open Sublime Text 2 files from the command line in linux to a tab, not a new window
Question I have ST2 setup so that I can do 'sublime file.txt' and it will open in a ST2 window. But how can I make it open in a new tab in the currently open window?
Answer Try Sublime command line help subl --help
Sublime Text 2 Build 2217
Usage: subl [arguments] [files] edit the given files
or: subl [arguments] [directories] open the given directories
or: subl [arguments] - edit stdin
Arguments: –project <project>: Load the given project –command <command>: Run the given command -n or –new-window: Open a new window -a or –add: Add folders to the current window -w or –wait: Wait for the files to be closed before returning -b or –background: Don’t activate the application -s or –stay: Keep the application activated after closing the file -h or –help: Show help (this message) and exit -v or –version: Show version and exit…
Read more ⟶