logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: httpd.conf - (copy old or edit new after upgrade)
Author
solorize



Joined: 16 Nov 2019
Posts: 4
Location: UK, London

PostPosted: Sun 04 Jun '23 14:49    Post subject: httpd.conf - (copy old or edit new after upgrade) Reply with quote

Hi, hopefully this is an easy question.

Every time I upgrade Apache webserver I take a copy
of my current HTTP.CONF file, and then once the
updated version of Apache webserver has been installed.
I then go through and edit the new HTTP.CONF file
to replicate the code that I had in my previous file
(which has customised edits to the code, that I have made).

What I would like to know is; am a wasting my time doing
this, when I could just copy my current HTTP.CONF file
over the new one?

Or

Could the new HTTP.CONF file have additional / modified code
that the older version may not have? So would not be recommended
for me to do this and would always be best to just edit the new file
after and update, to avoid possible problems.

Thanks in advance
Back to top
mrdj1024



Joined: 03 Apr 2023
Posts: 42
Location: Bridgeton,NJ,USA

PostPosted: Mon 05 Jun '23 4:14    Post subject: Reply with quote

keep the old one
those rarely change.
Back to top
DnvrSysEngr



Joined: 15 Apr 2012
Posts: 224
Location: Denver, CO USA

PostPosted: Mon 05 Jun '23 6:52    Post subject: Reply with quote

I second that. I keep my old Conf folder as it has everything just the way I want/need it. I may peruse the Conf folder that comes with the new build that I just downloaded, but 99.9% of the time there is nothing new / important / relevant in the Conf folders for my setup.

FWIW - Same holds true for NGinx conf files.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7360
Location: Germany, Next to Hamburg

PostPosted: Mon 05 Jun '23 8:43    Post subject: Reply with quote

I use git for tracking all my changes. So there are no backup copies flying around. And I can roll back if needed.
Back to top
solorize



Joined: 16 Nov 2019
Posts: 4
Location: UK, London

PostPosted: Mon 05 Jun '23 19:38    Post subject: Reply with quote

Thankyou both for confirming.

I will give it a go when I next update Apache.
Hopefully this will save me a bit of time
not having to edit the new one Smile
Back to top
mrdj1024



Joined: 03 Apr 2023
Posts: 42
Location: Bridgeton,NJ,USA

PostPosted: Tue 06 Jun '23 0:12    Post subject: Reply with quote

you can do the same for php updates aswell so you dont have to constantly configure the php.ini file everytime a new update is released.
if your using php 8.1 you can update everytime it updates by downloading the new php version,just make sure its in the same php branch,like 8.0 with 8.0 or 8.1 with 8.1 etc.
also make sure that if your using apache you get the thread safe php builds.
upgrading from php 8 to 8.1 wont work using this method.
it works only for php updates in the same "family"
just copy and paste and overwrite the files in your php folder with the new ones
same principle applies to mariadb/mysql versions in the same release family.
Back to top
tangent
Moderator


Joined: 16 Aug 2020
Posts: 346
Location: UK

PostPosted: Sun 11 Jun '23 11:44    Post subject: Reply with quote

My strategy is to make minimal changes to the default httpd.conf file, by referencing an optional include file added at the end, e.g.

Code:
# Include custom settings for my server.
#
IncludeOptional C:/Apache24/common/conf/httpd-my.conf

I locate this configuration file below an additional common directory, which contains other items that need to be separate from the Apache release files, e.g. common/conf, common/certs, common/cgi, etc.

You may need to comment out the default listener on port 80, if you don't need it, and the script alias default location if you choose to relocate it, e.g.

Code:
# Listen 80

# ScriptAlias /cgi-bin/ "${SRVROOT}/cgi-bin/"
Back to top


Reply to topic   Topic: httpd.conf - (copy old or edit new after upgrade) View previous topic :: View next topic
Post new topic   Forum Index -> Apache