You are not logged in.
Pages: 1
Topic closed
I am following this guide in the wiki:
https://wiki.archlinux.org/index.php/Vi … stallation
and i have hit a wall. I cannot progress beyond accessing postfixadmin setup via webpage. I installed Nginx and decided to use the uWSGI service instead of php-fpm because the uWSGI method comes with a pre-configure postfixadmin.ini file and should work.
https://wiki.archlinux.org/index.php/PostfixAdmin#uWSGI
When i enter the url http://127.0.0.1:8081/postfixadmin/setup.php i am faced with the following error:
Jul 16 15:00:35 archlinux uwsgi[1852]: [uWSGI] getting INI configuration from /etc/uwsgi/postfixadmin.ini
Jul 16 15:00:35 archlinux uwsgi[1852]: *** Starting uWSGI 2.0.18 (64bit) on [Tue Jul 16 15:00:35 2019] ***
Jul 16 15:00:35 archlinux uwsgi[1852]: compiled with version: 8.3.0 on 01 June 2019 14:21:45
Jul 16 15:00:35 archlinux uwsgi[1852]: os: Linux-5.2.0-arch2-1-ARCH #1 SMP PREEMPT Mon Jul 8 18:18:54 UTC 2019
Jul 16 15:00:35 archlinux uwsgi[1852]: nodename: archlinux
Jul 16 15:00:35 archlinux uwsgi[1852]: machine: x86_64
Jul 16 15:00:35 archlinux uwsgi[1852]: clock source: unix
Jul 16 15:00:35 archlinux uwsgi[1852]: pcre jit disabled
Jul 16 15:00:35 archlinux uwsgi[1852]: detected number of CPU cores: 8
Jul 16 15:00:35 archlinux uwsgi[1852]: current working directory: /
Jul 16 15:00:35 archlinux uwsgi[1852]: detected binary path: /usr/bin/uwsgi
Jul 16 15:00:35 archlinux uwsgi[1852]: setgid() to 973
Jul 16 15:00:35 archlinux uwsgi[1852]: setuid() to 973
Jul 16 15:00:35 archlinux uwsgi[1852]: your processes number limit is 15704
Jul 16 15:00:35 archlinux uwsgi[1852]: your memory page size is 4096 bytes
Jul 16 15:00:35 archlinux uwsgi[1852]: detected max file descriptor number: 1024
Jul 16 15:00:35 archlinux uwsgi[1852]: lock engine: pthread robust mutexes
Jul 16 15:00:35 archlinux uwsgi[1852]: thunder lock: disabled (you can enable it with --thunder-lock)
Jul 16 15:00:35 archlinux uwsgi[1852]: - SystemD socket activation detected -
Jul 16 15:00:35 archlinux uwsgi[1852]: uwsgi socket 1 attached to UNIX address /run/postfixadmin/postfixadmin.sock fd 3
Jul 16 15:00:35 archlinux uwsgi[1852]: PHP document root set to /usr/share/webapps/postfixadmin/public
Jul 16 15:00:35 archlinux uwsgi[1852]: PHP 7.3.6 initialized
Jul 16 15:00:35 archlinux uwsgi[1852]: your server socket listen backlog is limited to 100 connections
Jul 16 15:00:35 archlinux uwsgi[1852]: your mercy for graceful operations on workers is 60 seconds
Jul 16 15:00:35 archlinux uwsgi[1852]: mapped 802120 bytes (783 KB) for 10 cores
Jul 16 15:00:35 archlinux uwsgi[1852]: *** Operational MODE: preforking ***
Jul 16 15:00:35 archlinux uwsgi[1852]: *** no app loaded. going in full dynamic mode ***
Jul 16 15:00:35 archlinux uwsgi[1852]: *** uWSGI is running in multiple interpreter mode ***
Jul 16 15:00:35 archlinux uwsgi[1852]: spawned uWSGI master process (pid: 1852)
Jul 16 15:00:35 archlinux systemd[1]: Started uWSGI service unit.
Jul 16 15:00:35 archlinux uwsgi[1852]: spawned uWSGI worker 1 (pid: 1854, cores: 1)
Jul 16 15:00:35 archlinux uwsgi[1852]: [pid: 1854|app: -1|req: -1/1] 127.0.0.1 () {40 vars in 667 bytes} [Tue Jul 16 15:00:35 2019] GET /postfixadmin/setup.php => generated 9 bytes in 0 msecs (HTTP/1.1 404) 2 headers in 71 bytes (0 switches on core 0)
Jul 16 15:00:35 archlinux uwsgi[1852]: spawned uWSGI worker 2 (pid: 1855, cores: 1)
Jul 16 15:00:35 archlinux uwsgi[1852]: *** Stats server enabled on /run/postfixadmin/postfixadmin-stats.sock fd: 28 ***I have no idea why its saying there is no app loaded. Nor do i know what 'app' its refering to. I would appreciate any help in getting past this.
Here are my configs (if it helps):
/etc/nginx/nginx.conf
[archuser@archlinux ~]$ cat /etc/nginx/nginx.conf
user http;
# May be equal to `grep processor /proc/cpuinfo | wc -l`
worker_processes auto;
worker_cpu_affinity auto;
# PCRE JIT can speed up processing of regular expressions significantly.
pcre_jit on;
events {
# Should be equal to `ulimit -n`
worker_connections 1024;
# Let each process accept multiple connections.
multi_accept on;
# Preferred connection method for newer linux versions.
use epoll;
}
http {
server_tokens off; # Disables the “Server” response header
charset utf-8;
# Sendfile copies data between one FD and other from within the kernel.
# More efficient than read() + write(), since the requires transferring
# data to and from the user space.
sendfile on;
# Tcp_nopush causes nginx to attempt to send its HTTP response head in one
# packet, instead of using partial frames. This is useful for prepending
# headers before calling sendfile, or for throughput optimization.
tcp_nopush on;
# Don't buffer data-sends (disable Nagle algorithm). Good for sending
# frequent small bursts of data in real time.
#
tcp_nodelay on;
# On Linux, AIO can be used starting from kernel version 2.6.22.
# It is necessary to enable directio, or otherwise reading will be blocking.
# aio threads;
# aio_write on;
# directio 8m;
# Caches information about open FDs, freqently accessed files.
# open_file_cache max=200000 inactive=20s;
# open_file_cache_valid 60s;
# open_file_cache_min_uses 2;
# open_file_cache_errors on;
# http://nginx.org/en/docs/hash.html
types_hash_max_size 4096;
include mime.types;
default_type application/octet-stream;
# Logging Settings
access_log off;
# Gzip Settings
gzip on;
gzip_comp_level 6;
gzip_min_length 500;
gzip_proxied expired no-cache no-store private auth;
gzip_vary on;
gzip_disable "MSIE [1-6]\.";
gzip_types
application/atom+xml
application/javascript
application/json
application/ld+json
application/manifest+json
application/rss+xml
application/vnd.geo+json
application/vnd.ms-fontobject
application/x-font-ttf
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/bmp
image/svg+xml
image/x-icon
text/cache-manifest
text/css
text/plain
text/vcard
text/vnd.rim.location.xloc
text/vtt
text/x-component
text/x-cross-domain-policy;
# index index.php index.html index.htm;
include /etc/nginx/sites-enabled/*; # See Server blocks
}/etc/nginx/sites-enabled/postfixadmin.conf
[archuser@archlinux ~]$ cat /etc/nginx/sites-enabled/postfixadmin.conf
server {
listen 8081;
server_name localhost;
root /usr/share/webapps/postfixadmin/public/;
index index.php;
charset utf-8;
access_log /var/log/nginx/postfixadmin-access.log;
error_log /var/log/nginx/postfixadmin-error.log;
location / {
try_files $uri $uri/ index.php;
}
# pass all .php or .php/path urls to uWSGI
location ~ ^(.+\.php)(.*)$ {
include uwsgi_params;
uwsgi_modifier1 14;
uwsgi_pass unix:/run/postfixadmin/postfixadmin.sock;
}
}/etc/uwsgi/postfixadmin.ini
[archuser@archlinux ~]$ cat /etc/uwsgi/postfixadmin.ini
[uwsgi]
procname-master = postfixadmin
master = true
plugins = php
socket = /run/postfixadmin/%n.sock
stats = /run/postfixadmin/%n-stats.sock
uid = postfixadmin
gid = postfixadmin
processes = 10
cheaper = 2
cheaper-step = 1
idle = 120
die-on-idle = true
php-allowed-ext = .php
php-docroot = /usr/share/webapps/postfixadmin/public
php-index = index.php
php-set = date.timezone=Europe/Berlin
php-set = open_basedir=/tmp/:/usr/share/webapps/postfixadmin/:/etc/webapps/postfixadmin/:/usr/bin/doveadm:/var/cache/postfixadmin
php-set = session.save_path=/tmp
php-set = session.gc_maxlifetime 21600
php-set = session.gc_divisor 500
php-set = session.gc_probability 1
php-set = extension=mysqli.so
php-set = extension=imap.so/etc/webapps/postfixadmin/config.local.php
[archuser@archlinux ~]$ sudo cat /etc/webapps/postfixadmin/config.local.php
[sudo] password for archuser:
<?php
$CONF['configured'] = true;
// correspond to dovecot maildir path /home/vmail/%d/%u
$CONF['domain_path'] = 'YES';
$CONF['domain_in_mailbox'] = 'NO';
$CONF['database_type'] = 'mysqli';
$CONF['database_host'] = 'localhost';
$CONF['database_user'] = 'postfix_user';
$CONF['database_password'] = 'hunter2';
$CONF['database_name'] = 'postfix_db';
//
// // globally change all instances of ''change-this-to-your.domain.tld''
// // to an appropriate value
?>/etc/systemd/system/uwsgi-secure@.socket
[archuser@archlinux ~]$ sudo cat /etc/systemd/system/uwsgi-secure\@.socket
[Unit]
Description=Socket for uWSGI %I
[Socket]
ListenStream=/run/%I/%I.sock
SocketGroup=http
SocketMode=0660
[Install]
WantedBy=sockets.targetDirectory permission of /run/postfixadmin
[archuser@archlinux ~]$ ls -la /run/postfixadmin/
total 0
drwxr-xr-x 2 postfixadmin postfixadmin 80 Jul 16 15:00 .
drwxr-xr-x 21 root root 580 Jul 16 14:20 ..
srw-rw---- 1 root http 0 Jul 16 14:18 postfixadmin.sock
srwxr-xr-x 1 postfixadmin postfixadmin 0 Jul 16 15:00 postfixadmin-stats.sockdirectory permission of /usr/share/webapp/postfixadmin
[archuser@archlinux ~]$ ls -la /usr/share/webapps/postfixadmin/
total 124
drwxr-xr-x 10 root root 4096 Jul 14 17:23 .
drwxr-xr-x 3 root root 4096 Jul 14 17:23 ..
-rw-r--r-- 1 root root 3014 Apr 12 23:03 common.php
lrwxrwxrwx 1 root root 40 Apr 12 23:03 config.inc.php -> /etc/webapps/postfixadmin/config.inc.php
lrwxrwxrwx 1 root root 42 Apr 12 23:03 config.local.php -> /etc/webapps/postfixadmin/config.local.php
drwxr-xr-x 2 root root 4096 Jul 14 17:23 configs
-rw-r--r-- 1 root root 72843 Apr 12 23:03 functions.inc.php
lrwxrwxrwx 1 root root 35 Apr 12 23:03 .htaccess -> /etc/webapps/postfixadmin/.htaccess
-rw-r--r-- 1 root root 248 Apr 12 23:03 index.php
drwxr-xr-x 2 root root 4096 Jul 14 17:23 languages
drwxr-xr-x 3 root root 4096 Jul 14 17:23 lib
drwxr-xr-x 2 root root 4096 Jul 14 17:23 model
-rw-r--r-- 1 root root 978 Apr 12 23:03 phpunit.xml
drwxr-xr-x 5 root root 4096 Jul 14 17:23 public
drwxr-xr-x 3 root root 4096 Jul 14 17:23 scripts
drwxr-xr-x 2 root root 4096 Jul 14 17:23 templates
lrwxrwxrwx 1 root root 35 Apr 12 23:03 templates_c -> /var/cache/postfixadmin/templates_c
drwxr-xr-x 2 root root 4096 Jul 14 17:23 testsdirectory permission of /usr/share/webapp/postfixadmin/public
[archuser@archlinux ~]$ ls -la /usr/share/webapps/postfixadmin/public/
total 216
drwxr-xr-x 5 root root 4096 Jul 14 17:23 .
drwxr-xr-x 10 root root 4096 Jul 14 17:23 ..
-rw-r--r-- 1 root root 4244 Apr 12 23:03 backup.php
-rw-r--r-- 1 root root 4168 Apr 12 23:03 broadcast-message.php
-rw-r--r-- 1 root root 58 Apr 12 23:03 common.php
drwxr-xr-x 2 root root 4096 Jul 14 17:23 css
-rw-r--r-- 1 root root 1504 Apr 12 23:03 delete.php
-rw-r--r-- 1 root root 1483 Apr 12 23:03 editactive.php
-rw-r--r-- 1 root root 7883 Apr 12 23:03 edit.php
drwxr-xr-x 2 root root 4096 Jul 14 17:23 images
-rw-r--r-- 1 root root 3833 Apr 12 23:03 index.php
-rw-r--r-- 1 root root 4160 Apr 12 23:03 list.php
-rw-r--r-- 1 root root 17911 Apr 12 23:03 list-virtual.php
-rw-r--r-- 1 root root 2596 Apr 12 23:03 login.php
-rw-r--r-- 1 root root 700 Apr 12 23:03 main.php
lrwxrwxrwx 1 root root 25 Apr 12 23:03 password-change.php -> users/password-change.php
lrwxrwxrwx 1 root root 26 Apr 12 23:03 password-recover.php -> users/password-recover.php
-rw-r--r-- 1 root root 1908 Apr 12 23:03 sendmail.php
-rw-r--r-- 1 root root 17202 Apr 12 23:03 setup.php
-rw-r--r-- 1 root root 74977 Apr 12 23:03 upgrade.php
drwxr-xr-x 4 root root 4096 Jul 14 17:23 users
-rw-r--r-- 1 root root 6812 Apr 12 23:03 vacation.php
-rw-r--r-- 1 root root 2548 Apr 12 23:03 viewlog.php
-rw-r--r-- 1 root root 5863 Apr 12 23:03 xmlrpc.phpServices runing
● archlinux
State: degraded
Jobs: 0 queued
Failed: 1 units
Since: Tue 2019-07-16 14:16:27 AEST; 1h 3min ago
CGroup: /
├─user.slice
│ └─user-1000.slice
│ ├─user@1000.service
│ │ ├─xfce4-notifyd.service
│ │ │ └─878 /usr/lib/xfce4/notifyd/xfce4-notifyd
│ │ ├─init.scope
│ │ │ ├─744 /usr/lib/systemd/systemd --user
│ │ │ └─745 (sd-pam)
│ │ ├─gpg-agent.service
│ │ │ └─817 /usr/bin/gpg-agent --supervised
│ │ ├─at-spi-dbus-bus.service
│ │ │ ├─848 /usr/lib/at-spi-bus-launcher
│ │ │ ├─854 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
│ │ │ └─856 /usr/lib/at-spi2-registryd --use-gnome-session
│ │ └─dbus.service
│ │ ├─787 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
│ │ └─812 /usr/lib/xfce4/xfconf/xfconfd
│ └─session-3.scope
│ ├─ 779 /usr/lib/lxdm/lxdm-session
│ ├─ 780 /bin/sh /etc/xdg/xfce4/xinitrc -- /etc/X11/xinit/xserverrc
│ ├─ 794 xfce4-session
│ ├─ 815 /usr/bin/ssh-agent -s
│ ├─ 819 xfwm4 --display :0.0 --sm-client-id 22cf30b4c-8a03-4259-b9ec-994428d151b2
│ ├─ 820 xfce4-panel --display :0.0 --sm-client-id 21d1043eb-da63-4816-b306-4f35b0fa13c7
│ ├─ 824 xfsettingsd --display :0.0 --sm-client-id 29c5a3370-4cab-42b7-8763-fbdcb67c8d7b
│ ├─ 830 Thunar --sm-client-id 27b34255b-f0d7-4947-a6c4-5f0bac44618a --daemon
│ ├─ 837 /usr/lib/xfce4/panel/wrapper-1.0 /usr/lib/xfce4/panel/plugins/libsystray.so 6 8388638 systray Notification Area Area where notification icons appear
│ ├─ 839 /usr/lib/xfce4/panel/wrapper-1.0 /usr/lib/xfce4/panel/plugins/libactions.so 2 8388639 actions Action Buttons Log out, lock or other system actions
│ ├─ 857 xfdesktop --display :0.0 --sm-client-id 23770625a-3d5a-4628-9a0e-7aecb470b056
│ ├─ 862 /usr/lib/firefox/firefox --sm-client-id 2670d4e51-955a-4e2e-b066-557628ee1400
│ ├─ 863 xfce4-terminal --geometry=101x35 --display :0.0 --role=xfce4-terminal-1563167263-3079756584 --show-menubar --show-borders --hide-toolbar --active-tab --working-directory /home/archuser --tab --working-directory /home/archuser --window --geometry=101x38 --display :0.0 --role=xfce4-terminal-1563085479-680766834 --show-menubar --show-borders --hide-toolbar --active-tab --working-directory /etc/dovecot/conf.d --sm-client-id 2f91adda9-5524-4090-84fc-663971af3323
│ ├─ 870 xfce4-power-manager --restart --sm-client-id 2c66c3646-b825-495c-8e69-6b715e95fbe7
│ ├─ 895 bash
│ ├─ 905 bash
│ ├─ 907 /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
│ ├─ 912 bash
│ ├─ 967 /usr/lib/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 1 -prefMapSize 181520 -parentBuildID 20190709135731 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 862 true tab
│ ├─1004 /usr/lib/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 226 -prefMapSize 181520 -parentBuildID 20190709135731 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 862 true tab
│ ├─1032 /usr/lib/firefox/firefox -contentproc -childID 3 -isForBrowser -prefsLen 6031 -prefMapSize 181520 -parentBuildID 20190709135731 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 862 true tab
│ ├─1106 /usr/lib/firefox/firefox -contentproc -childID 4 -isForBrowser -prefsLen 7189 -prefMapSize 181520 -parentBuildID 20190709135731 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 862 true tab
│ ├─1185 /usr/lib/firefox/firefox -contentproc -childID 5 -isForBrowser -prefsLen 7429 -prefMapSize 181520 -parentBuildID 20190709135731 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 862 true tab
│ ├─1303 /usr/lib/firefox/firefox -contentproc -childID 6 -isForBrowser -prefsLen 7640 -prefMapSize 181520 -parentBuildID 20190709135731 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 862 true tab
│ ├─1368 sudo journalctl -f
│ ├─1369 journalctl -f
│ ├─1419 /usr/lib/firefox/firefox -contentproc -childID 7 -isForBrowser -prefsLen 8668 -prefMapSize 181520 -parentBuildID 20190709135731 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 862 true tab
│ ├─1520 /usr/lib/firefox/firefox -contentproc -childID 9 -isForBrowser -prefsLen 8668 -prefMapSize 181520 -parentBuildID 20190709135731 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 862 true tab
│ ├─1598 /usr/lib/firefox/firefox -contentproc -childID 10 -isForBrowser -prefsLen 8668 -prefMapSize 181520 -parentBuildID 20190709135731 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 862 true tab
│ ├─1968 sudo systemctl status
│ └─1969 systemctl status
├─init.scope
│ └─1 /sbin/init
└─system.slice
├─systemd-udevd.service
│ └─356 /usr/lib/systemd/systemd-udevd
├─nginx.service
│ ├─1154 nginx: master process /usr/bin/nginx -g pid /run/nginx.pid; error_log stderr;
│ ├─1155 nginx: worker process
│ ├─1156 nginx: worker process
│ ├─1157 nginx: worker process
│ ├─1158 nginx: worker process
│ ├─1159 nginx: worker process
│ ├─1160 nginx: worker process
│ ├─1161 nginx: worker process
│ └─1162 nginx: worker process
├─mariadb.service
│ └─484 /usr/bin/mysqld
├─polkit.service
│ └─797 /usr/lib/polkit-1/polkitd --no-debug
├─lxdm.service
│ ├─756 /usr/sbin/lxdm-binary
│ └─758 /usr/lib/Xorg -background none :0 vt01 -nolisten tcp -novtswitch -auth /var/run/lxdm/lxdm-:0.auth
├─systemd-journald.service
│ └─344 /usr/lib/systemd/systemd-journald
├─NetworkManager.service
│ └─1256 /usr/bin/NetworkManager --no-daemon
├─lvm2-lvmetad.service
│ └─353 /usr/bin/lvmetad -f
├─dovecot.service
│ ├─1760 /usr/bin/dovecot -F
│ ├─1762 dovecot/anvil
│ ├─1763 dovecot/log
│ └─1764 dovecot/config
├─upower.service
│ └─882 /usr/lib/upowerd
├─dbus.service
│ └─458 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
└─systemd-logind.service
└─457 /usr/lib/systemd/systemd-loginduwsgi-secure@postfixadmin.socket service
● uwsgi-secure@postfixadmin.socket - Socket for uWSGI postfixadmin
Loaded: loaded (/etc/systemd/system/uwsgi-secure@.socket; enabled; vendor preset: disabled)
Active: active (listening) since Tue 2019-07-16 14:18:18 AEST; 1h 5min ago
Listen: /run/postfixadmin/postfixadmin.sock (Stream)
Tasks: 0 (limit: 4711)
Memory: 0B
CGroup: /system.slice/system-uwsgi\x2dsecure.slice/uwsgi-secure@postfixadmin.socket
Jul 16 14:18:18 archlinux systemd[1]: Starting Socket for uWSGI postfixadmin.
Jul 16 14:18:18 archlinux systemd[1]: Listening on Socket for uWSGI postfixadmin.If there is something i have missed please let me know.
Last edited by foxbat (2019-07-16 05:35:04)
Offline
I was able to resolve this. It turned out that the correct url was http://127.0.0.1:8081/setup.php and not http://127.0.0.1:8081/postfixadmin/setup.php
Please close this.
Last edited by foxbat (2019-07-16 11:50:54)
Offline
Closing at OP request.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Pages: 1
Topic closed