Where is the keystone virtual configuration file in Devstack? - openstack

Where is the file wsgi-keystone.conf located in the Devstack env?
I am trying to configure federation.
I only can see this file:
keystone-wsgi-public.conf
Which contains:
ProxyPass "/identity" "unix:/var/run/uwsgi/keystone-wsgi-public.socket|uwsgi://uwsgi-uds-keystone-wsgi-public/" retry=0
Thank you

Related

elasticbeanstalk does not copy my nginx config

I want to add max-upload-size.conf file to /etc/nginx/conf.d directory in elastic beanstalk but it was not working.
My environment is Java 8 running on 64bit Amazon Linux/2.11.3
All ways below are not copied my config file.
.platform/nginx/conf.d/max-upload-size.conf
client_max_body_size 50M;
.ebextensions/nginx/conf.d/max-upload-size.conf
client_max_body_size 50M;
I followed the processes below
check documentation.
create max-upload-size.conf
./gradlew clean & ./gradlew bootJar
eb deploy
eb ssh and check nginx directory (/etc/nginx/conf.d)
I already checked https://stackoverflow.com/a/63626941/7770508 and https://stackoverflow.com/a/51888100/7770508.
Is there really no way to extend it?
Your platform 64bit Amazon Linux/2.11.3 is Amazon Linux 1 (AL1), not AL2. From your post its not clear if you checked offcial AWS documentation for nginx in Java for AL1. So the example on how to setup nginx for AL1 for Java is in:
Configuring the proxy on Amazon Linux AMI (preceding Amazon Linux 2)
with full config file on github.

'[crit]' 398#398: *45 error - loading jpg from gphotofs mounted file system

Background:
Busy with a project with the goal of serving jpg from a nikon d750 camera with nginx.
Physical key -> GPIO RPI -> Callback -> websocket -> client -> show jpg from:
gphotofs mounted file system.
Everything works fine as long as I don't try to load from the mounted file system, if I do I get the error:
[crit] 398#398: *45 stat() nginx
The mounted directory is: /var/www/html/mount/ [store_00020001/DCIM/110D7100]
I can see all the files, so its properly mounted.
I tried:
chown -R 777 /var/www/html/mount
and:
adduser www-data /var/www/html/mount
Anyone ideas on how to solve this?
So this was an permissions based fault.
I ran gphotofs command from root, and tried to acces this directory via a symlink from www-data.
I solved this as followed (with using APACHE instead of NGINX):
changed envvar files as followed:
sudo nano /etc/apache2/envvars
change:
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
to:
export APACHE_RUN_USER=pi
export APACHE_RUN_GROUP=pi
Created the symlink, and allowed apache to follow symlinks by editing conf file:
sudo nano /etc/apache2/sites-enabled/000-default.conf
and added the following lines BETWEEN virtualhost tags:
<Directory />
Options FollowSymLinks
AllowOverride Indexes
</Directory>
Done.

Nginx service not starting on Windows 10 - nginx: [alert] could not open error log file: CreateFile()

I have an Nginx service that's configured to start automatically on my Windows 10; however, this morning, the service wouldn't start.
The error log says: nginx: [alert] could not open error log file: CreateFile() "C:\someForlderName\build\distribution\.\nginx/logs/error.log" failed (3: The system cannot find the path specified)
Looking at the path in the error log above, I do NOT have the /logs/ folder on my local system so it looks like Nginx doesn't have the proper permissions to create that folder?
I'm setup as an admin user and my service is set to Log On As - Local System Account
This only happens on Windows 10; but the service starts and works on
older Windows i.e 8.1
So does anyone know how to grant administrator's permissions to Nginx so that Nginx can create folders and files on Windows 10 ?
You need:
To install nginx/Windows, download the latest mainline version distribution (1.13.8), since the mainline branch of nginx contains all known fixes. Then unpack the distribution, go to the nginx-1.13.8 directory, and run nginx. Here is an example for the drive C: root directory: (Run cmd as administrator)
cd c:\
unzip nginx-1.13.8.zip
cd nginx-1.13.8
start nginx
Go to: http://localhost:80 -> test install
Goback to console cmd: "nginx -s stop"
Run for next time:
Config with file: "C:\nginx-1.13.8\conf\nginx.conf"
Open cmd as administrator
Run bash: "cd C:\nginx-1.13.8"
Run nginx with bash: "start nginx" . If you run with bash: "nginx", will get trouble for exit nginx.
And
nginx -s stop #fast shutdown
nginx -s quit #graceful shutdown
nginx -s reload #changing configuration, starting new worker processes with a new configuration, graceful shutdown of old worker processes
nginx -s reopen #re-opening log files
Under the directory that you run nginx.exe, try to create a directory named logs, and a file named error.log under log.
It should pass this error.
After downloading zip file, you have unzip.
Make sure that you dont have nested folder names. You have to copy your folder which has nginx.exe file in it, and paste it into C:/ folder.
While running commands, like nginx -s stop, make sure that current your working directory is same as the nginx.exe file.
enter image description here
Nginx start on default port 80, not 8080. Try localhost:80 on browser.
If you want to change port, open C:\nginx-1.16.1\conf\nginx.conf with text editor.
change port number what you want use default port.
server {
listen 80;
server_name localhost;
to:
server {
listen 8080;
server_name localhost;
I had a similar issue with starting the nginx server, but after looking at it closely and trying to run the command in different consoles, I realized it just a simple issue of a missing path.
How I solved it was to cd into the containing folder for the nginx.exe file (which actually contains error logs and all the necessary files) and then run the nginx command which started the server and fixed it for me.

Artifactory web page is unaccessible

Artifactory has been installed on a RHEL 6.2 machine using RPM, but I couldn't connect to the Artifactory webpage using the link http://<server-ip>:8081/artifactory
When I use curl http://localhost:8081/artifactory on the same machine, it doesnt show up any error.
Later in the day, realized, there is no Apache on this machine. So installed Apache on the yum repository and followed the instructions for Running Behind HTTP Server and configured the httpd.conf file under /etc/httpd/conf with below configuration
<VirtualHost *:80>
ServerName <server-ip>
ServerAlias <server-ip>
ServerAdmin <email-address>
ProxyPreserveHost on
ProxyPass /artifactory/ http://localhost:8081/artifactory/
ProxyPassReverse /artifactory/ http://<server-ip>:8081/artifactory/
# DocumentRoot /srv/www/httpd/htdocs/
ErrorLog "logs/artifactory-error_log"
#CustomLog
# ServerSignature Off
But still couldn't connect to the Artifactory webpage. What does Document Root refer to, I do not have this directory on my machine.
Do I install Apache first before installing Artifactory or my installations should not be a problem.
First, lets put aside the small things.
1. You don't have to install apache to work with Artifactory, it should work just fine without it.
2. DocumentRoot is a mandatory element but useless when Apache is used as a proxy for Tomcat, so it can point to any path (doesn't' have to actually exist).
Now, to the business. When you see a blank page instead of Artifactory home page, it usually means that something went wrong during the install. You should look in the logs (both /var/opt/jfrog/artifactory/logs/artifactory.log and Tomcat logs (catalina.out and localhost.log) in /opt/jfrog/artifactory/tomcat/logs. Chances are you'll be able to easily spot the error (ports conflict, permissions issue, etc.) if not, please update the question with the relevant log parts.

How do I add new site/server_name in nginx?

I'm just starting to explore nginx on my ubuntu 10.04. I installed nginx and I'm able to get the "Welcome to Nginx" page on localhost. However I'm not able to add a new server_name.
Even when I make the changes in site-available/default. I also tried reloading/restarting nginx, but nothing works.
To build on mark's answer, Debian/Ubuntu distros default configuration file has an include /etc/nginx/sites-enabled/*; directive with site configuration file stored in /etc/nginx/sites-available/, a default site is usually included in that dir.
For examples beyond the default config, follow nginx beginner's guide or see wiki.nginx.org for more details.
After creating a new configuration in sites-available, create a symbolic link with this command, assuming that your conf file is named "myapp" and nginx is at /etc/nginx (could also be at /usr/local/etc/nginx):
ln -s /etc/nginx/sites-available/myapp /etc/nginx/sites-enabled/myapp
By the way, you could always create your conf file directly in sites-enabled but the recommended way above allows you to "enable and disable" sites on the server very quickly without actually moving/deleting your conf files.
P.S: Don't trust the tutorials: check your configuration!
P.P.S: You can use the command nginx -t to test your sites conf and nginx -s reload to reload the conf.
The usual way to add another site in Nginx in Ubuntu is to copy the sites-available/default file to sites-available/new-site-name, then create a symbolic link in sites-enabled to sites-available/new-site-name.
In the new configuration file, you need to edit the listen and server directives. Use listen to specify the IP address and port, and the server directive to specify the hostnames. For more details, see HttpCoremodule.

Resources