Cannot find Lando apache default config files - apache

I'm using Lando to create a local development server for a Laravel project with the recipe below in .lando.yml
name: projectname
recipe: laravel
config:
php: '7.3'
composer_version: '2.0.7'
via: apache:2.4
webroot: .
database: mysql:5.7
cache: none
xdebug: false
config:
server: lando/httpd.conf
I need to add a few lines to a custom httpd.conf so I specify a path server: lando/httpd.conf. However, I couldn't locate the current default httpd.conf in order to make a copy and use it as a custom file. The link provided on Lando official site doesn't seem to work.

Did you try looking in the apache2 foler in the container?
$lando ssh
$cd /etc/apache2

Related

node red cannot GET /myfile from directory

I would like to ask.
I have file in C:\users\nxf68958\.Node-red\report.html
And when I would like to open this file by: localhost:1880/report.html
I get:
Cannot GET /report.html
in Log I have: "Nov 09:52:00 - [info] User directory : \Users\nxf68958\.node-red"
I am using:
NR: 3.0.2
Node: 18.12.0
It worked perfectly on older versions of: NR: 2.2 and Node: 16.13.
Then I actualized and it stopped working.
In settings.js is option: "fileWorkingDirectory" I tried to change it, but without change.
What I am doing wrong?
Thank you
Node-RED will not serve static files by default, you have to explicitly enable it by settings the httpStatic option in the settings.js file.
Settings the httpStatic value to point to the userDir (which is what you have basically done by setting it to __dirname) is a bad idea from a security point of view because this means anybody can download your flows.json and flows_creds.json files and the files like settings.js and .config.runtime.json (which holds the default encryption key for the creds file).
fileWorkDirectory is purely to set the default working directory for the code nodes that interact with the filesystem, it will have no effect on what files are served by the HTTP server.

spring cloud config with native file

when config files changed,the config server did not reload the changes.
It can't monitor the native file changes or something wrong?
spring:
profiles:
active: native
cloud:
config:
server:
native:
search-locations: classpath:/conf/, classpath:/conf/licensingservice/
enter image description here
Since that your configuration are packed in your jar if you change a configuration since that it is saved in your classpath the server do not see the modification.
A better option is save these config in an other place outside the classpath.
you can use a configuration like below:
spring:
application:
name: configserver
cloud:
config:
server:
native:
searchLocations: file://${LOCAL_REPO}
in this way you can pilot the place with the environment variable LOCAL_REPO.
Of course I suggest you for the production to move the configuration repository to a git repository that it is a more suitable production ready choice.
I hope that this can help you

Named URLs for React app

Does Create-React-App support named URLs e.g. my-app.dev as opposed to the default localhost:3000?
I am using a Windows 10 machine. I used to use an Apache virtual host to set this up but I can't figure out how to do it in CRA.
UPDATE:
I've half solved the problem by adding 127.0.0.1 www.my-app.dev my-app.dev to the hosts file located at C:\Windows\System32\drivers\etc.
I also had to create a .env file in the root of my React project and added HOST = my-app.dev
I then tried to add PORT = 0 to the .env file but that made no difference.
Now when I run the app with npm start it opens at my-app.dev:3000
Is there a way to get rid of of the port?
I have found the answer on the CRA Github page here

Yii 2.0 showing Warning: Module 'mysql' already loaded in Unknown on line 0

I am new to yii 2.0. I installed my first Yii2.o application on my server and configred URL to use user friendly urls. However, I am getting
Warning: Module 'mysql' already loaded in Unknown on line 0
message when I go to the web/about/ URL. I tried to remove the base rout using "defaultRoute" in web.php but that is also not possible.
Please help me to figure out this issue.
That has nothing to do with Yii 2.0. It's a PHP misconfiguration.
Probably, you've enabled mysql extension twice. Search in your php.ini and extensions ini files:
extension=mysql.so
or
extension=mysql.dll
I had the same problem and i fix it by deleting this line in my php.ini:
extension=mysql.so
located in: /etc/php5/apache2/ and restarting apache2 service:
sudo service apache2 restart

Error in template in Apache cookbook when running to an Ubuntu Server

I'm using Chef in my digital Ocean account, to build a droplet/instance. My server a Ubuntu 12.04 x64 .
In my Cheffile i have
...
site 'http://community.opscode.com/api/v1'
cookbook 'apache2',
:git =>'https://github.com/opscode-cookbooks/apache2'
....
And in my node json:
...
"apache": {
"default_modules" :
["status","alias","auth_basic","autoindex","dir","env","mime","negotiation","setenvif"]
},
...
"run_list": [
"recipe[gearman]",
"recipe[postgresql::server]",
"recipe[php]",
"recipe[apache2]",
"recipe[apache2::mod_php5]",
"recipe[mysql]",
"recipe[mysql::server]"
]
I had to already limit the modules because of some error with authz. But now, I'm always receiving the error
* The apache2 configtest failed.
STDERR: Output of config test was:
AH00526: Syntax error on line 11 of /etc/apache2/apache2.conf:
Invalid command 'LockFile', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
Whats is wrong with my configuration to have erros in:
Apache traditional setup (with all the modules?)
Template error for LockFile?
It looks like this might be a known issue with chef and the Apache2 recipe.
See the related tickets on the opscode issue tracker.
https://tickets.opscode.com/browse/COOK-3837
https://tickets.opscode.com/browse/COOK-3838
https://tickets.opscode.com/browse/COOK-3900
For now you could perhaps try installing version 2.2 of apache by overridding the attribute
default['apache']['package']
I have found a temporary workaround for this, at leas until the cookbook gets updated.
Replace the following section in your config located in apache2/templates/apache2.conf.erb.
LockFile /var/lock/apache2/accept.lock
With this:
Mutex file:${APACHE_LOCK_DIR} default
I had similar problems, and I just wanted to vagrant up my ubuntu/trusty64 with apache2 using chef-solo. Ubuntu 14 and Apache 2.4 to be precise.
It worked after:
Following jmreicha's answer above
Removing module "mod_authz_default" that got removed from 2.4 as of http://httpd.apache.org/docs/current/upgrading.html
It's a pity, I would assume that this basic configuration should work out-of-box. As mentioned above, migration from apache2.2 to apache2.4 is planned here: https://tickets.opscode.com/browse/COOK-3900