How to Start 2FAuth #23
Replies: 17 comments 1 reply
-
Hi, Here is the step I follow when I want to run a new app on my local apache2 server.
(replace
|
Beta Was this translation helpful? Give feedback.
-
Thank You :) |
Beta Was this translation helpful? Give feedback.
-
Hi, does this support nginx? If so, would this be the right configuration? server {
root /var/www/2FAuth/public;
index index.php;
server_name 2FAuth.example.com;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
location ~ /\.ht {
deny all;
}
} I get HTTP Error 500, I think the issue is with my config Thanks, |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm not familiar with nginx but I think your server name is wrong: If you appended the line Otherwise it should be something like |
Beta Was this translation helpful? Give feedback.
-
I'm sorry, but where exactly is the |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Usually, I don't have to modify the |
Beta Was this translation helpful? Give feedback.
-
Indeed adding a dedicated host in your But as described here the server name has to point to your domain or your ip address. Did you try to set your conf like: server {
root /var/www/2FAuth/public;
index index.php;
server_name 127.0.0.1;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
location ~ /\.ht {
deny all;
}
} or server {
root /var/www/2FAuth/public;
index index.php;
server_name localhost;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
location ~ /\.ht {
deny all;
}
} Also did you enabled your new site and restarted nginx? (see those steps in my link) |
Beta Was this translation helpful? Give feedback.
-
I've put the domain as my |
Beta Was this translation helpful? Give feedback.
-
😞 As 2FAuth is Laravel based maybe you should have a look to the Laravel deployment doc : https://laravel.com/docs/7.x/deployment#nginx |
Beta Was this translation helpful? Give feedback.
-
Alright, I'll see and let you know, thanks! |
Beta Was this translation helpful? Give feedback.
-
Nope, that didn't work :( This is my configuration now: server {
listen 80;
listen[::]:80;
root /home1/www/2fa.example.com/public;
index index.php;
server_name 2fa.example.com;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
} |
Beta Was this translation helpful? Give feedback.
-
Should I, perhaps, install Laravel? 🤔 |
Beta Was this translation helpful? Give feedback.
-
Did you run You should have followed all steps of the installation process to get a ready to run app. Anyway, 50x errors are server errors so the issue come from your nginx setup. Have you tried to run another app with the same nginx setup? Does it works? |
Beta Was this translation helpful? Give feedback.
-
Yes, I followed the guide. |
Beta Was this translation helpful? Give feedback.
-
My pleasure, glad it works 👍🏻 |
Beta Was this translation helpful? Give feedback.
-
@Bubka Hi! I just wanted to say I saw this on the UnRaid CA store and I LOVE the idea! I just set it up for myself. Looks like right now it only has 1 account possible, but in the future I'd love to get my family members off of Google Auth and onto this! Is there any way I can support your development efforts? |
Beta Was this translation helpful? Give feedback.
-
Hi,
I followed all the installation steps on the github page and they all went smoothly.
My question is, how do I start 2FAuth? If it helps, I use Apache2 as my main web server.
Thank You
Beta Was this translation helpful? Give feedback.
All reactions