I want to deploy a django app on an Ubuntu machine.
I installed apache2:
sudo apt-get install apache2
Next, I have to edit httpd.conf (I'm reading this documentation) but I don't know where it is.
Where is httpd.conf?
Ubuntu and Debian
The configuration file will be in /etc/apache2/
According to the answer on another question, the file might also be named apache2.conf.
CentOS
The file will be in /etc/httpd/
Ubuntu and debian
/etc/apache2/apache2.conf
Centos and redhat
/etc/httpd/conf/httpd.conf
Related
Background:
I created a sandbox VM with VirtualBox on my macOS. It correctly spins up a VM (with CentOS7 running on it) on which I can access to.
Inside this sandbox vm, I want to spin up several vms in order to test Ansible Playbooks with Kitchen CI & Vagrant, thus I installed VirtualBox by downloading it from the following link: https://download.virtualbox.org/virtualbox/5.2.8/VirtualBox-5.2-5.2.8_121009_el7-1.x86_64.rpm
After the installation I executed the command:
[david#vmkitchen-env ansible-test]# VBoxManage --version
It returned:
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (3.10.0-693.2.1.el7.x86_64) or it
failed to load. Please recompile the kernel module and install it
by
sudo /sbin/vboxconfig
You will not be able to start VMs until this problem is fixed.
5.2.8r121009
I installed the Development tools, but I keep getting the same issue.
I don't think I need to recompile any kernel module. Any idea?
Thanks in advance for your help.
So, after searching on the internet, and not just on the VirtualBox website, I found the solution, and I was right: I did not need to compile any module.
The following is the reference to the CentOS wiki page:
https://wiki.centos.org/HowTos/Virtualization/VirtualBox
In a few words, I had to install dkms and kernel-devel packages. In order to do so, I needed to install EPEL repository; but personally I prefer to install and enable the IUS repository.
The following are the set of commands that worked for me:
yum groupinstall "Development tools"
yum install https://centos7.iuscommunity.org/ius-release.rpm
yum install dkms
yum install kernel-devel
reboot
After the machine had rebooted, I was able to get VirtualBox working fine.
I verified by the command line:
[david#vmkitchen-env ansible-test]# VBoxManage --version
And it returned the correct value:
5.2.8r121009
Below steps fixed the issue for me.
1.sudo /sbin/vboxconfig
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
kernel-devel kernel-devel-3.10.0-957.10.1.el7.x86_64
2.This website has the kernel module - website
wget https://linuxsoft.cern.ch/cern/centos/7/updates/x86_64/Packages/kernel-devel-3.10.0-957.10.1.el7.x86_64.rpm
4.yum localinstall kernel-devel-3.10.0-957.10.1.el7.x86_64.rpm -y
5.sudo /sbin/vboxconfig
Issue resolved
On Fedora 36, I only had to run
sudo /sbin/vboxconfig
On working project, after installation of updates, I get errors with all dusk tests
1) Tests\Browser\ExampleTest::testBasicExample
Facebook\WebDriver\Exception\SessionNotCreatedException: session not created exception: Chrome version must be >= 60.0.3112.0
(Driver info: chromedriver=2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4),platform=Linux 4.4.0-81-generic x86_64)
I have already reinstalled dusk, updated composer and vagrant... And I have no any ideas how to update that dirver.
I am using macOS Sierra 10.12.1 and vagrant box on localhost. Chrome doesn't installed on the system.
Thanks for any advice..
Well...
After couple hours of dancing and googling, I installed update on the virtual Ubuntu
sudo apt-get update # Fetches the list of available updates
sudo apt-get upgrade # Strictly upgrades the current packages
sudo apt-get dist-upgrade # Installs updates (new ones)
It changed the version of Chrome.
After, I changed in my domain name .dev to .test, because Chrome >63+ forces .dev domains to HTTPS via preloaded HSTS.
Try to install chrome driver for a different version, I had the same issue and this fixed:
php artisan dusk:chrome-driver 74
I have installed Laravel 5.2 successfully on my Mac machine. But now I am walking through the procedures to install Laravel on AWS.
Once I got the instance running, I installed apache, php and mysql with the following command:
sudo yum install -y httpd24 php56 mysql55-server php56-mysqlnd
The php version is 5.6.17
I then did the following:
composer global require "laravel/installer"
and updated the path: export PATH=$PATH:~/.composer/vendor/bin
when I navigate to /var/www/html and do "laravel new ", the project gets created but I receive an mbstring extension problem. Below is a text dump of what I saw:
laravel new hws3
Crafting application...
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for laravel/framework v5.2.29 -> satisfiable by laravel/framework[v5.2.29].
- laravel/framework v5.2.29 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
I've scoured the internet and only found a solution for Windows. I am using Amazon Linux. Any guidance would be most appreciated.
It seems you have php 5.6 installed.
You need to install mbstring for that particular version of php.
Run sudo yum install php56-mbstring
credits: Alex Andrei answered here
If you want to install Laravel with composer, This is the right answer!
sudo su //to be root
yum install php56-mbstring
How to install xsendfile for httpd 2.4 on amazon linux ami? Default package repositories from amazon and epel do not have a package for httpd 2.4, only for httpd 2.2. I would prefer not to compile the module if possible. Thank you.
I'm not aware of a quick Yum/apt-get style install for X-sendfile for Apache24 on an EC2 instance at the time of writing this answer, however compiling and installing the module your self is super easy:
Prepwork
Download mod_xsendfile.c from download section the link below
https://tn123.org/mod_xsendfile/
Install GCC for compiling
sudo yum install gcc
We need httpd24-devel for apxs
sudo yum install httpd24-devel.x86_64
Compiling and installation
sudo apxs -cia mod_xsendfile.c
Edit your http.conf add
<IfModule mod_xsendfile.c>
XSendFile on
XSendFilePath /home/path/to/private/files/to/serve/
</IfModule>
Restart Apache24
sudo service httpd restart
Done !
Check your phpinfo or apache_modules() to confirm all good and modify settings to your liking.
Enjoy efficient downloads :)
I've been using apt-get install uwsgi to install uWSGI for my Django application. Today, I realized I needed a feature that's not available until uWSGI 1.1, and Ubuntu 12.04.1 doesn't have anything after 1.0.x, at least according to my apt-get install uwsgi=1.1 attempt. So, I used:
pip install http://projects.unbit.it/downloads/uwsgi-lts.tar.gz
After doing so, I get a message prescribing the use of /usr/local/bin/uwsgi to launch the program. I'm not a guru when it comes to compiling from source, but my understanding is that when you do so, nothing will be changed in the /etc/ directory. Is this correct? If not, why don't I have a /etc/uwsgi/ directory and, more specifically, a /etc/uwsgi/apps-enabled/ directory? Should I simply create the directories when installing uWSGI from source? I was hesitant to do so, considering there is no mention of this in the docs (I don't want something that accidentally works, etc.).
Sorry for this very late reply, but maybe this will help people who'll find this answer in the future:
To get /etc/uwsgi etc, you need to install the uwsgi package from Debian or Ubuntu (whatever you are using) by running aptitutde install uwsgi. However this will by default probably install an ancient version of uwsgi! The uwsgi binary is placed in /usr/bin/uwsgi when installing uwsgi this way.
To get the latest version, also install uwsgi using pip using pip install -U uwsgi, which (on my Ubuntu system at least) will put the uwsgi binary in /usr/local/bin/uwsgi then go do the following:
cd /usr/bin/
mv uwsgi uwsgi-old
ln -s /usr/local/bin/uwsgi uwsgi
Alternatively: edit the uwsgi init script and edit the DAEMON="/usr/bin/uwsgi" appropriately.
Et voila: "debianism" (full init scripts, etc) and the latest uwsgi binary!
/etc/uwsgi and friends is a 'debianism'. The uWSGI project is all about the sysadmin taste, so if you like the /etc/uwsgi approach just create the directory, drop config files in it and start the uWSGI Emperor to manage instances.