how to get the wiregaurd config that is already set on my system? - config

I have set up configuration for wiregaurd in the past and now I'm trying to have access to that configuration again (Not trying to change it or anything I just want to have that configuration to use it again in case I want to reinstall my os)
I'm using ubuntu 22 TLS

Related

Laravel: how to specify the php version?

I have a Laravel (5.7.19) app running with apache2 on a redhat7 machine. There are php5.6, php7.1 and php7.4 installed on the machine and somehow apache uses php5.6 as the default and the app doesn't work with php5.6. Is there a way to specify a php version for a Laravel app, such as setting the php version in .env or some other config file of the app? I've googled around and couldn't find an answer. Right now the only way I could make the app to work is to disable php5.6 and then apache would use php7.1 as the default.
"Is there a way to specify a php version for a Laravel app, such as setting the php version in .env or some other config file of the app?"
No. The PHP interpetor isn't aware of itself. The application's dotenv file is read by the application itself, which means there's already an interpretor doing the job so if it's picked up by php5, there's no way for the interpretor to pass it along to a php7 interpreter.
If you're using Apache (and assuming a single Apache running), you can setup multiple PHP versions under the same Apache server by using the fastcgi module as described here: https://medium.com/#sivaschenko/apache-running-multiple-php-versions-simultaneously-570fc1541580 and then depending on application you can setup virtual hosts using different php versions
THe better way is with nginx + fpm, where you can have different php versions with different fpm instances running on different ports and you can setup server blocks where php requests are routed appropriately.

Passenger with apache fails with "End time can not be before or equal to begin time"

Running Passenger 6.0.4 with Apache 2.4.18 on Ubuntu 64 bit server 16.04.
I have a virtual system set up and whenever I try to access it Passenger quits with the subject message. I have not been able to find any suggestion about what might be wrong.
I have a couple of cloud servers set up with over 100 virtual hosts using ubuntu 14.04 but I want to move up to a supported version.
I received the same error when attempting to setup an instance of Canvas LMS. I resolved this by simply adding a folder called "passenger" in the /tmp folder.
That's needed for Passenger to run properly and for some reason wasn't created on it's own.

CAS 5.2.4 cas.properties location

I'm using CAS 5.2.4, deployed on Tomcat 9.0.8, running on Windows 10. I want to connect to LDAP, but I don't know where the cas.properties has to be placed.
I have already placed it in :
C:\etc\cas
C:\etc\cas\config
'tomcat'\cas\etc\cas
'tomcat'\cas\WEB-INF\classes
Ok, the problem was that I changed the property spring.profiles.active, I set it as production, now I change it, again, to standalone.
When the stand alone profile is active CAS search extra configurations in /etc/cas/config in particular the file standalone.properties.
When the production profile is active CAS doen not search more configuration files, except if the spring cloud is configurated.
Are you running 5.2.4 or 5.3.4? Given there is no such thing as 5.3.4, you may want to correct the question.
Also note that tomcat 9 is officially not supported.
Properties by default go to c:\etc\cas\config on Windows, which is the same path as /etc/cas/config on Linux. The initial "/" on windows is translated to be the root drive, which for you might be "c:".

Trying to Properly configure the mod alias in Apache

I'm running apache 2.2.24 on Max OS X 10.9.1. Currently, we have a network drive that we access all of our Git repos on at /Volumes/GitWebsites. I would like to configure Apache to serve our PHP based repos from that directory. So, localhost (or 127.0.0.1)/phpsite1/ or /phpsite2? etc. will serve sites from /Volumes/GitWebsites/phpsite1/ or /phpsite2/ in the browser. My two questions are:
Do I simply modify the server root or do I need to use the mod-alias in the httpd.conf file?
What are the permission setting I need to in order for apache to access /Volumes/GitWebsites ?
I've done configuration changes like this in IIS 7.5 and set up a NodeJS dev environment but still new to make large scale changes to Apache. Thanks for any help given.
If you are happy with serving the contents of /Volumes/GitWebsites as it is then it should be fine to point the document root at it. It's also makes it easy to add sites later.
However this could be troublesome later if you want to manage php configuration later on for the sites separately.

Apache running MongoDB and PHP

I'm using XAMPP in my Mac OSX. I've installed mongodb and copied the .so file into xampp plugins folder. My phpinfo() of the page shows that MongoDB section which is installed.
After i start Apache of XAMPP server, when i code
m = new MongoClient();
$db = $m->mydatabase;
$collection = $db->myCollection;
Its saying some Fatal Error.
If i run mongod command in Terminal window, its working. Then what is the use of installing mongodb in XAMPP server. My Questions are
Why its working like that..?
Is there any way to start mongod when we start Apache server.
Why its working like that..?
Installing the PHP driver and the MongoDB server are two completely different things.
This is very basic driver stuff; you require a library or communication layer that can route your PHP programming to the MongoDB server (basically).
Is there any way to start mongod when we start Apache server.
You could make an sh script that looks like:
/etc/init.d/xammp_service_dunno_what_it_is_called start
/etc/init.d/mongodb start
Then you could just attach to the startup, or even better you can just attach both services (XAMPP and MongoDB) to the startup of your computer.
However, as far as I know, there is no way to create a sort of trigger mechanism that will load up MongoDB when the OS detects that you have started running Apache.