I've tried to install Apache with homebrew on a clean install of macOS Sierra.
brew install php71 --with-httpd24
I got this warning many times during the installation
Warning: Use httpd instead of deprecated homebrew/apache/httpd24
Installation of Apache finished with this log:
Warning: Use httpd instead of deprecated homebrew/apache/httpd24
==> Installing homebrew/php/php71 dependency: homebrew/apache/httpd24
==> Downloading https://homebrew.bintray.com/bottles/httpd-2.4.27_2.sierra.bottl
==> Downloading from https://akamai.bintray.com/19/19bf2114d17e94601fa6eed220a0f
######################################################################## 100.0%
==> Pouring httpd-2.4.27_2.sierra.bottle.tar.gz
==> Caveats
To have launchd start httpd now and restart at login:
brew services start httpd
Or, if you don't want/need a background service you can just run:
apachectl start
==> Summary
🍺 /usr/local/Cellar/httpd/2.4.27_2: 1,620 files, 25.9MB
And php71 installed with this log:
==> Installing homebrew/php/php71 --with-httpd24
Warning: Use httpd instead of deprecated homebrew/apache/httpd24
Warning: Use httpd instead of deprecated homebrew/apache/httpd24
Warning: Use httpd instead of deprecated homebrew/apache/httpd24
Warning: Use httpd instead of deprecated homebrew/apache/httpd24
==> ./configure --prefix=/usr/local/Cellar/php71/7.1.8_20 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/7.1 --with-config-file-pa
==> make
==> make install
==> Caveats
To enable PHP in Apache add the following to httpd.conf and restart Apache:
LoadModule php7_module /usr/local/opt/php71/libexec/apache2/libphp7.so
<FilesMatch .php$>
SetHandler application/x-httpd-php
</FilesMatch>
Finally, check DirectoryIndex includes index.php
DirectoryIndex index.php index.html
The php.ini file can be found in:
/usr/local/etc/php/7.1/php.ini
✩✩✩✩ Extensions ✩✩✩✩
If you are having issues with custom extension compiling, ensure that you are using the brew version, by placing /usr/local/bin before /usr/sbin in your PATH:
PATH="/usr/local/bin:$PATH"
PHP71 Extensions will always be compiled against this PHP. Please install them using --without-homebrew-php to enable compiling against system PHP.
✩✩✩✩ PHP CLI ✩✩✩✩
If you wish to swap the PHP you use on the command line, you should add the following to ~/.bashrc, ~/.zshrc, ~/.profile or your shell's equivalent configuration file:
export PATH="$(brew --prefix homebrew/php/php71)/bin:$PATH"
✩✩✩✩ FPM ✩✩✩✩
To launch php-fpm on startup:
mkdir -p ~/Library/LaunchAgents
cp /usr/local/opt/php71/homebrew.mxcl.php71.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php71.plist
The control script is located at /usr/local/opt/php71/sbin/php71-fpm
OS X 10.8 and newer come with php-fpm pre-installed, to ensure you are using the brew version you need to make sure /usr/local/sbin is before /usr/sbin in your PATH:
PATH="/usr/local/sbin:$PATH"
You may also need to edit the plist to use the correct "UserName".
Please note that the plist was called 'homebrew-php.josegonzalez.php71.plist' in old versions of this formula.
With the release of macOS Sierra the Apache module is now not built by default. If you want to build it on your system you have to install php with the --with-httpd24 option. See brew options php71 for more details.
To have launchd start homebrew/php/php71 now and restart at login:
brew services start homebrew/php/php71
==> Summary
🍺 /usr/local/Cellar/php71/7.1.8_20: 346 files, 51MB, built in 11 minutes 23 seconds
I've done it a dozen times on multiple machines. But not this time!
1- Apache is not working as I start it. Safari can't load localhost.
2- What is that warning? What does it mean?
3- Where is the /usr/local/etc/apache2 directory? Has it moved or renamed in new homebrew update?
As I checked the /usr/local/etc/ directory, there is no apache2 or httpd24 directory. Only a httpd directory with contents of a fresh Apache installation!
hadi#MyMBP:/usr/local/etc/httpd$ ll
total 248
drwxr-xr-x 14 hadi admin 476 Sep 30 21:51 extra
-rw-r--r-- 1 hadi admin 21109 Sep 30 22:46 httpd.conf
-rw-r--r-- 1 hadi admin 20919 Sep 30 22:31 httpd.conf.bak
-rw-r--r-- 1 hadi admin 13077 Sep 30 21:51 magic
-rw-r--r-- 1 hadi admin 60855 Sep 30 21:51 mime.types
drwxr-xr-x 4 hadi admin 136 Sep 30 21:51 original
Where is /usr/local/etc/apache2?
Bad timing. Homebrew just changed the way it installs httpd, and the PHP formulas haven't been updated to work with it yet.
https://github.com/Homebrew/homebrew-php/issues/4493
Although there are probably other ways of getting it working, the cleanest way to deal with this is probably to wait until they fix the PHP formulas.
Related
I went thru any tutorial I could find to install and configure Apache on Big Sur. Invariably, the tutorial when discussing the config files will point to /usr/local/etc/httpd/httpd.conf that needs to be massaged a bit. The only trouble is that the file doesn't exist when I check that dir. Any idea? Thanks for your help in advance.
EDIT: I did an uninstall and install of httpd per requested and I still don't get the /usr/local/. There must be something different the homebrew configuration.
➜ ~ brew uninstall httpd
Uninstalling /opt/homebrew/Cellar/httpd/2.4.49... (1,660 files, 31.9MB)
➜ ~ brew install httpd
==> Downloading https://ghcr.io/v2/homebrew/core/httpd/manifests/2.4.49
Already downloaded: /Users/johnny/Library/Caches/Homebrew/downloads/6c60d66c3915be5c993e144a743960b9e6be26e557efeeb6c61f530c79ffed34--httpd-2.4.49.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/httpd/blobs/sha256:e6ebcb4a1307
Already downloaded: /Users/johnny/Library/Caches/Homebrew/downloads/8506f199d5d7def536481d6fa87aa94c25201b57072d032e97edb8ce78fa86a3--httpd--2.4.49.arm64_big_sur.bottle.tar.gz
==> Pouring httpd--2.4.49.arm64_big_sur.bottle.tar.gz
==> Caveats
DocumentRoot is /opt/homebrew/var/www.
The default ports have been set in /opt/homebrew/etc/httpd/httpd.conf to 8080 and in
/opt/homebrew/etc/httpd/extra/httpd-ssl.conf to 8443 so that httpd can run without sudo.
To restart httpd after an upgrade:
brew services restart httpd
Or, if you don't want/need a background service you can just run:
/opt/homebrew/opt/httpd/bin/httpd -D FOREGROUND
==> Summary
🍺 /opt/homebrew/Cellar/httpd/2.4.49: 1,660 files, 31.9MB
➜ ~
[Edited and updated]
I am using macOS Catalina 10.15.7 / Xcode-select version 2373 and by running $ brew install httpd I can install the Apache service under /usr/local/
Can you please remove and install it again by using the same command and sharing all the output?
These are the important things:
DocumentRoot is /usr/local/var/www.
The default ports have been set in /usr/local/etc/httpd/httpd.conf to 8080 and in
/usr/local/etc/httpd/extra/httpd-ssl.conf to 8443 so that httpd can run without sudo.
To start httpd:
brew services start httpd
Or, if you don't want/need a background service you can just run:
/usr/local/opt/httpd/bin/httpd -D FOREGROUND
This is the list of directories.
$ ls -lrt /usr/local/etc/httpd
total 200
drwxr-xr-x 14 user admin 448 Sep 22 23:35 extra
-rw-r--r-- 1 user admin 21222 Sep 22 23:35 httpd.conf
-rw-r--r-- 1 user admin 13064 Sep 22 23:35 magic
-rw-r--r-- 1 user admin 60847 Sep 22 23:35 mime.types
drwxr-xr-x 4 user admin 128 Sep 22 23:35 original
And this is my test showing it is working.
$ curl localhost:8080
<html><body><h1>It works!</h1></body></html>
$ tail -f /usr/local//var/log/httpd/access_log
::1 - - [22/Sep/2021:23:39:35 -0500] "GET / HTTP/1.1" 200 45
Based on your output and the brew documentation I believe you are using Apple Silicon is that correct, can you confirm?
https://docs.brew.sh/Installation
This script installs Homebrew to its preferred prefix (/usr/local for macOS Intel, /opt/homebrew for Apple Silicon, and /home/linuxbrew/.linuxbrew for Linux) so that you don’t need sudo when you brew install. It is a careful script; it can be run even if you have stuff installed in the preferred prefix already. It tells you exactly what it will do before it does it too. You have to confirm everything it will do before it starts.
I am trying to install a PIM named Akeneo. The system requirements are all checked:
https://docs.akeneo.com/2.3/install_pim/manual/system_requirements/system_requirements.html
I am on Apache2 / Ubuntu 16.04
My /var/www/ directory all belongs to www-data:www-data ( ran chown -R www-data:www-data to install )
Error message from server : “Could not open input file: composer.phar”
Googled about it , got many results, and looked on the forums on stakoverflow, found answers from 2010 to 2018. I think I have maybe found out that the problem could be linked with the file "composer.phar", the way symlinks work on apache2, and composer installed globally or "inside individual project(s)".
Following 2 tutorials, I had to install composer to continue the install for that PIM.
My server says:
Composer (version 1.10.10) successfully installed to:
/usr/local/bin/composer
If I navigate to cd ~ and run ls I see there is "composer.phar" and "composer-setup.php" here.
I am confused because the Akeno tutorial says:
After extracting the file, change into the Akeneo directory and run
the commands below:
cd /var/www/html/akeneo/pim-community-standard
sudo php -d memory_limit=3G ../composer.phar install --optimize-autoloader --prefer-dist
sudo php bin/console cache:clear --no-warmup --env=prod
...
I don't understand the composer.phar install part . There are no composer.phar file inside any directories : not in /var/www/html/akeneo/ and not in /var/www/html/akeneo/pim-community-standard
Was it supposed to generate a composer.phar file there ? Should it find composer.phar one level above ( ../composer.phar ) ? I doubled checked the Akeneo PIM files , and the original .rar archive has no composer.phar file. Or, is it something to do with a symlink that accesses the global "composer.phar" which was with the global install ? Regarding symlinks, there are some in the "vendor" fodler of the PIM, and runing ls -l -a gives :
lrwxrwxrwx 1 www-data www-data 28 Feb 5 2020 doctrine -> ../doctrine/orm/bin/doctrine
lrwxrwxrwx 1 www-data www-data 34 Feb 5 2020 doctrine-dbal -> ../doctrine/dbal/bin/doctrine-dbal
lrwxrwxrwx 1 www-data www-data 46 Feb 5 2020 doctrine-migrations -> ../doctrine/migrations/bin/doctrine-migrations
lrwxrwxrwx 1 www-data www-data 56 Feb 5 2020 requirements-checker -> ../symfony/requirements-checker/bin/requirements-checker
lrwxrwxrwx 1 www-data www-data 51 Feb 5 2020 var-dump-server -> ../symfony/var-dumper/Resources/bin/var-dump-server
There is a composer.json and composer.lock file inside /var/www/html/akeneo/pim-community-standard . So confused because the turorial says to be inside pim-community-standard directory and run this : php -d memory_limit=3G ../composer.phar install --optimize-autoloader --prefer-dist
I hope I can resume the install without breaking anything. Some posts give the solution of updating composer, or installing composer-phar, inside the project. I am honestly totally lost.
( I don't know if I should bring that up, but is docker needed (not talked about in tutorial - but I see a folder with "docker" in it and I know that composer and docker can work together sometimes )
I moved the composer.phar file into the app directory. Now the install advanced. It's not a technical issue a misconfiguration or anything like that.
It's a lack of information about Composer on the Akeneo site but it's probably assumed that users should have knowledge about Composer allready.
Solution for me : moving the "composer.phar" file (from 'home' for me ) to the /var/www/project/ (.. the correct level directory).
So for my case it was a global / local install issue , which is still unclear, and I will have to look deeper how to properly install composer. Not sure if my current setup will not cause any issue later since it's like I installed it globally at first then moved only one file.
Also, command "composer" is not returning anything. I do have the composer file in /usr/bin/ though. This is very strange.
first of all, thanks for your time trying to help.
I have an old server, Ubuntu 8.04, not supported anymore.
Since June, a payment platform I'm working with has deactivated the TLSv1 and SSL.
My server is running under :
Apache 2.2.8 /
Openssl 0.9.8 /
PHP 5.2.17 /
Ubuntu 8.04
I have installed a new version of openssl (using wget) :
openssl version
OpenSSL 1.0.2o 27 Mar 2018
My version of apache is too old to support TLSv1.2, I need to upgrade it to apache 2.2.23 minimum version.
How to compile apache in order to take into account the new OpenSSL version?
PS: I just take a new server to migrate my website, but it takes time to adapt the code... Changing the server is not an option for now .. I need to make it work as fast as possible, and then I'll be able to focus on the error introduced by PHP 7...
Thanks in advance to help the newbie i am..
Since this old Ubuntu is no longer supported, you can most probably not use the repos to install Apache.
Compiling your own is doable following instructions here: http://httpd.apache.org/docs/2.2/install.html.
When you run ./configure you will have to use --enable-ssl and --with-ssl=DIR. The DIR is where OpenSSL resides (not the source code, but the installation directory). Check the ./configure output to identify any missing requisites.
Once you run make install, you will then have to compile PHP with that new OpenSSL, and link to the newly compiled Apache. http://ca3.php.net/manual/en/install.unix.apache2.php
This is how I compile my HTTP (notes taken a while back, some versions might differ). Adapt for your needs, and this is provided "as is", no warranty :-)
The prerequisites are based on RHEL 6 or 7, adapt as required.
Required software:
- apr-1.6.2
- apr-iconv-1.2.1
- apr-util-1.5.4
- httpd-2.4.26
(identical procedure used with previous versions of 2.4)
- openssl-1.0.2l
(identical prodecure used with older versions of 1.0)
- Unzip and untar these under /opt/app/SOURCES
System setup
Ask Unix to create:
- /opt/app/httpd, owner httpd, group httpd, permissions 775
- user httpd, group httpd
Create these directories
- /opt/app/apr
- /opt/app/apr-iconv
- /opt/app/apr-util
- /opt/app/httpd
- /opt/app/openssl
- all owned by httpd, group httpd, permissions 750
Procedure
Get Unix to install prerequisites
for F in libxml2.i686 libxml2.x86_64 libxml2-devel.i686 libxml2-devel.x86_64 apr-devel.i686 apr-devel.x86_64 apr-util.i686 apr-util.x86_64 pcre-devel.i686 pcre-devel.x86_64 autoconf libtool
do
yum install -y $F
done
Switch to the httpd user.
Install APR
cd /opt/app/SOURCES/apr-1.6.2
./buildconf
./configure --prefix=/opt/app/apr
make
make install
Keep the directory as is, APR Util and APR Iconv require the APR sources to refer to.
Install APR Util
cd /opt/app/SOURCES/apr-util-1.5.4
./buildconf --with-apr=/opt/app/SOURCES/apr-1.6.2
./configure --prefix=/opt/app/apr-util --with-apr=/opt/app/apr
make
make install
Install APR Iconv
cd /opt/app/SOURCES/apr-iconv-1.2.1
./configure --prefix=/opt/app/apr-iconv --with-apr=/opt/app/apr
make
make install
Install OpenSSL
cd /opt/app/SOURCES/openssl-1.0.2l
export CFLAGS=-fPIC
./config --prefix=/opt/app/openssl --openssldir=/opt/app/openssl shared
make clean
make
make test
make install
Install Apache
cd /opt/app/SOURCES/httpd-2.4.26
export LD_LIBRARY_PATH=/opt/app/openssl/lib
./configure --prefix=/opt/app/httpd --with-mpm=worker --enable-rewrite --enable-ssl --with-ssl=/opt/app/openssl --enable-proxy --enable-rewrite --enable-log-forensic --enable-log-debug --enable-expires --enable-headers --enable-unique-id --with-apr=/opt/app/apr --with-apr-util=/opt/app/apr-util
make
make install
vi /opt/app/httpd/bin/envvars
Add /opt/app/openssl/lib to the LD_LIBRARY_PATH
Note for the ./configure: this was done to build an Apache used as a proxy. change the --enable* options as required.
Configure HTTP
- The original configuration files after installation are saved in /opt/app/httpd/conf/original
- While it is impossible to cover all configuration options, at least these should be changed from the install configuration:
--- Listen 80: change as required.
--- User httpd
--- Group httpd
--- ServerAdmin EMAILADDRESS
--- ServerName <HOSTNAME>:80
--- Comment or uncomment the modules, as required
--- Uncomment slotmem_shm_module
--- Comment: CustomLog "logs/access_log" common
--- Uncomment: CustomLog "logs/access_log" combined
--- Comment the following sections (the entire section!):
----- <IfModule alias_module>
----- <IfModule cgid_module>
----- <Directory "/opt/app/httpd/cgi-bin">
--- Uncomment:
----- Include conf/extra/httpd-mpm.conf
----- Include conf/extra/httpd-default.conf
----- Edit conf/extra/httpd-mpm.conf
----- Change performance options as required. The defaults are ok until you have a large amount of traffic.
----- Edit conf/extra/httpd-default.conf
----- Comment AccessFileName .htaccess
----- ServerTokens Prod
--- Test the configuration: /opt/app/httpd/bin/apachectl -t
--- Start it and access it with a browser. It should return a simple "It works!" message (unless you have installed some HTML content).
And this is my procedure for PHP compilation, again no warranty, "as is". You can ignore the parts about DB2, Oracle and PostgreSQL if you do not connect to these DB.
Prerequisites
- A compiled version of Apache HTTP and it's requisites. See HTTP installation.
- It "could" work with RedHat's compiled Apache, but it is not recommended. If RH's Apache is used, might as well use RH's PHP build.
- PHP source code: download from http://php.net
- This procedure has been tested with success on versions: 5.3.13, 5.5.7, 5.6.3, 5.6.30. No modifications were required.
Install Red Hat pre-requisites:
- libxml, libxml-devel
- libpng, libpng-devel
- libjpg, libjpg-devel
If using DB2
- Install DB2 client under /opt/app
- PHP searches for the lib directory, so:
cd /opt/app/ibm/db2/V10.5
ln -s lib64 lib
If using Oracle
- Install the Oracle Instant Client in /opt/app/oracle
Overview
PHP must be compiled and "linked" to Apache. Apache must therefore be compiled before PHP.
Depending on which database PHP will connect to, the configure options must be changed.
http://php.net has more documentation and details for the build process, this is just what was used.
Build
Pre-compile configure
The configure command will detect what other software is installed on the system and link libraries.
Note for the database clients: they can all be linked at the same time, but it is recommended to link only the ones required.
The command is:
./configure --with-apxs2=/opt/app/httpd/bin/apxs \
--prefix=/opt/app/php \
--with-config-file-path=/opt/app/php \
--enable-zip \
--with-zlib \
--enable-mbstring \
--with-gd \
--with-pear \
--with-pdo-odbc=ibm-db2,/opt/app/ibm/db2/V10.5 \ # if using DB2 only!
--with-oci8=instantclient,/opt/app/oracle/instantclient_11_2 # if using Oracle only!
--with-pgsql \ # if using PostgreSQL only!
--with-pdo-pgsql # if using PostgreSQL with PDO only!
Compile
make clean
make
make test
make install
$(make test) will report errors for the Oracle driver. MANY errors! The driver will still work (it was used for the nettracker replacement scripts to load Pharmaclik IBM HTTP Server logs into Oracle). But it will be impossible to use bind variables on Integers. That explains why that script does not use oci_bind* functions.
Post-compile configure
libtool --finish /opt/app/php/lib
cp php.ini-development /opt/app/php/php.ini
OR
cp php.ini-production /opt/app/php/php.ini
In php.ini, add these:
include_path = ".:/php/includes:/opt/app/php/lib/php"
date.timezone = 'America/Montreal'
Configure Apache
These lines are possibly already there since the PHP $(make install) takes care of it, if the httpd.conf file is "clean" (i.e. has not been modified from the originally installed file).
Add these to httpd.conf:
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php .phtml
I just broke my local development web server while trying to install jenkins. Jenkins works. But other sites that I have built and used to access on my web server do not work.
I was following this article: https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu
After following the main section to download and install jenkins, i ran the steps in the section "Setting up an Apache Proxy for port 80 -> 8080".
That's when I managed to break apache.
Here's the history of what I ran:
me#mydevbox:~$ sudo apt-get install jenkins
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-image-4.2.0-34-generic linux-image-extra-4.2.0-34-generic
python-support
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
daemon
The following NEW packages will be installed:
daemon jenkins
0 upgraded, 2 newly installed, 0 to remove and 8 not upgraded.
Need to get 64.0 MB of archives.
After this operation, 65.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu/ wily/universe daemon amd64 0.6.4-1 [98.2 kB]
Get:2 http://pkg.jenkins-ci.org/debian-stable/ binary/ jenkins 1.651.2 [63.9 MB]
Fetched 64.0 MB in 6s (9,372 kB/s)
Selecting previously unselected package daemon.
(Reading database ... 433471 files and directories currently installed.)
Preparing to unpack .../daemon_0.6.4-1_amd64.deb ...
Unpacking daemon (0.6.4-1) ...
Selecting previously unselected package jenkins.
Preparing to unpack .../jenkins_1.651.2_all.deb ...
Unpacking jenkins (1.651.2) ...
Processing triggers for man-db (2.7.4-1) ...
Processing triggers for systemd (225-1ubuntu9) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up daemon (0.6.4-1) ...
Setting up jenkins (1.651.2) ...
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
[ ok ] Starting jenkins (via systemctl): jenkins.service.
ln: failed to create symbolic link ‘/run/openrc/started/jenkins’: No such file or directory
Processing triggers for systemd (225-1ubuntu9) ...
Processing triggers for ureadahead (0.100.0-19) ...
me#mydevbox:~$ sudo /etc/init.d/jenkins start
[ ok ] Starting jenkins (via systemctl): jenkins.service.
me#mydevbox:~$ sudo vim /etc/default/jenkins
me#mydevbox:~$ /etc/init.d/jenkins restart
[ ok ] Restarting jenkins (via systemctl): jenkins.service.
me#mydevbox:~$
This is what I've specified for the HTTP port in the jenkins config file:
# port for HTTP connector (default 8080; disable with -1)
HTTP_PORT=8080
After that, I ran this:
me#mydevbox:~$ sudo a2enmod proxy
Enabling module proxy.
To activate the new configuration, you need to run:
service apache2 restart
me#mydevbox:~$ sudo a2enmod proxy_http
Considering dependency proxy for proxy_http:
Module proxy already enabled
Enabling module proxy_http.
To activate the new configuration, you need to run:
service apache2 restart
me#mydevbox:~$ service apache2 restart
me#mydevbox:~$ sudo a2dissite default
ERROR: Site default does not exist!
me#mydevbox:~$ sudo a2dissite 000-default
Site 000-default disabled.
To activate the new configuration, you need to run:
service apache2 reload
me#mydevbox:~$ service apache2 reload
And then I created a jenkins.conf file in /etc/apache2/sites-available/
That file looks like this:
<VirtualHost *:80>
ServerAdmin webmaster#localhost
ServerName ci.company.com
ServerAlias ci
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost on
ProxyPass / http://localhost:8080/ nocanon
AllowEncodedSlashes NoDecode
</VirtualHost>
At this point, when I try to run:
http://localhost:8080/
That launches jenkins.
But I no longer can run my other sites which i launched like this:
localhost/mytestapp
The error I get is:
HTTP ERROR 404
Problem accessing /mytestapp/. Reason:
Not Found
Prior to attempting Jenkins install, I just installed apache2 and left all defaults. I would just create folders under /var/www/html and they would "just magically" appear in my browser.
Sorry for the trouble. But any help would be appreciated.
EDIT 1
I think my problem is related to this:
me#mydevbox:~$ sudo a2dissite 000-default
Site 000-default disabled.
I never noticed that in the output before. When I checked that file, it looks like that was the original conf I had.
Here's what I have in the sites-available folder:
me#mydev:/etc/apache2/sites-available$ ls -lah
total 24K
drwxr-xr-x 2 root root 4.0K May 30 11:06 .
drwxr-xr-x 8 root root 4.0K Apr 19 15:18 ..
-rw-r--r-- 1 root root 1.5K Apr 19 15:30 000-default.conf
-rw-r--r-- 1 root root 6.3K Jan 7 2014 default-ssl.conf
-rw-r--r-- 1 root root 282 May 30 11:06 jenkins.conf
me#mydev:/etc/apache2/sites-available$
So I guess I need a way to re-enable 000-default.conf and just add an entry for jenkins to use port 8080 or something like that.
Googling for examples but in the mean time, if you have any suggestions, I'd appreciate them.
Thanks.
I ran the following commands to enable both sites:
me#mydev:/etc/apache2$ sudo a2ensite 000-default
Enabling site 000-default.
To activate the new configuration, you need to run:
service apache2 reload
me#mydev:/etc/apache2$ service apache2 reload
me#mydev:/etc/apache2$ cd sites-enabled/
me#mydev:/etc/apache2/sites-enabled$ ls
000-default.conf jenkins.conf
I tried ,but didn't work for me.
Apache 2.4 on CentOS 6.6:
Step 1:
cd /etc/yum.repos.d/
wget http://repos.fedorapeople.org/repos/jkaluza/httpd24/epel-httpd24.repo
Step 2:
yum install httpd24.x86_64
Step 3:
$ /opt/rh/httpd24/root/usr/sbin/httpd -version
Server version: Apache/2.4.6 (Red Hat)
Server built: Sep 25 2013 05:25:46
NOTE: config files are in: /opt/rh/httpd24/root/etc/httpd
$ ls
conf conf.d conf.modules.d logs modules run
EDIT: in case you want to switch off Apache 2.2
$ chkconfig httpd off
$ chkconfig --list | grep httpd
httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
httpd24-httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
EDIT 2: http://wiki.apache.org/httpd/PHP-FPM
yum install php-fpm
/etc/init.d/php-fpm start
Does any body knows the solutions, please let me know.
It would be best if you built it yourself from the Apache source code on a CentOS 6.6 system.
Compiling and Installing Apache 2.4:
http://httpd.apache.org/docs/current/install.html
Make note of the configure line during the build so you can make sure it includes all the modules you want (Like mod_ssl...etc..). Details on what is available for the configure line located here http://httpd.apache.org/docs/current/programs/configure.html
$ CC="pgcc" CFLAGS="-O2" \
./configure --prefix=/sw/pkg/apache \
--enable-ldap=shared \
--enable-lua=shared
If you want your own RPM, create a SPEC file with your own customizations.
The easiest way is to install the SCL version, as described here:
https://unix.stackexchange.com/questions/412122/how-to-update-apache-to-2-4-29-using-scl