You are not logged in.
dcolburn wrote:Am I correct that I need to install nginx-module-geoip?
That depends on whether or not you want to use module-geoip, no? I can't make that determination for you.
Please disregard that question - I misread this thread as installing the module to populate defaults rather than merely using it because the OP wanted it.
https://stackoverflow.com/questions/36554405/how-to-enable-dynamic-module-with-an-existing-nginx-installation
Ha! Found it on the backup USB drive (BTW: Deja Dup did not do a clean job of saving stuff at all.)
##
# Virtual Host configuration for realupnow.com
#
# Be sure to symlink this to ~/sites-enabled/ to enable it.
# sudo ln -s /etc/nginx/sites-available/realupnow.com /etc/nginx/sites-enabled/realupnow.com
#
server {
listen 80;
root /var/www/realupnow.com;
# index index.html index.htm index.nginx-debian.html index.php;
server_name realupnow.com www.realupnow.com;
listen 443 ssl;
location / {
try_files $uri $uri/ =404;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
# RSA certificate
ssl_certificate /etc/letsencrypt/live/realupnow.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/realupnow.com/privkey.pem;
ssl_dhparam /etc/ssl/certs/dhparam.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
# Redirect non-https traffic to https
if ($scheme != "https") {
return 301 https://$host$request_uri;
}
}
Just found this .. https://www.reddit.com/r/nginx/comments/j11tr3/whats_up_with_the_modulesenabled_directory/
It's incomplete but a little helpful ...
The relationship between /etc/nginx/modules-available/ /usr/share/nginx/modules-available/ and /etc/nginx/modules-enabled/ is unclear to me ... it's more complex than the singular relationship between /etc/nginx/sites-available and /etc/nginx-sites-enabled
And, I'm still worried that I may have broken something somewhere and maybe should completely uninstall and re-install nginx.
(Note: php-fpm has also been installed - I don't know if that might be impacted by anything I've done so far.)
WDYT?
I'm sorry ... I'm getting tangled in the threads ...
nginx -t fusses about /etc/nginx/modules-enabled/realupnow.conf not being present.
This was in the sample code include /etc/nginx/modules-enabled/*.conf; but it errored - now I recall changing it ...
And now I recall that I never closed the loop on hunting the realupnow.conf file to put there ... sigh.
user www-data;
error_log logs/error.log notice;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/realupnow.conf;
load_module modules/ndk_http_module.so;
load_module modules/ngx_http_lua_module.so;
# include conf.d/http;
# include conf.d/stream;
# include conf.d/exchange-enhanced;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
server {
listen localhost:80;
}
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}
/etc/nginx/modules-available/ is empty
/usr/share/nginx/modules-available/ is populated
/etc/nginx/modules-enabled/ is populated
But /etc/nginx/modules-enabled/realupnow.conf" failed
I am familiar with sites-enabled and sited-enabled but cannot find anything online that explains modules-available and modules-enabled in a way that shows me how realupnow-conf would get there.
EDIT: Am I correct that I need to install nginx-module-geoip? https://stackoverflow.com/questions/365 … stallation
Remove the cdrom lines from /etc/apt/sources.list. I did link you to the Devuan site page showing the correct repositories in another thread, didn't I?
OK, fixed, thanks!
You have a much higher opinion of my capacity to recall all of that than is warranted.
My threads have threads for which keeping track of them I really need two heads.
Meanwhile, I think I may have broken nginx when I uninstalled apache ... but that's the missing modules-available thread ...
This shows up when I update the repository list in Synaptic.
Is it one of those "Just ignore it" anomalies? The repository 'cdrom://[Devuan GNU/Linux 4.0 chimaera amd64 - desktop 20211012] chimaera Release' does not have a Release file.
Is port 80 already being used by another application?
ss -nlt 'sport = 80'
The script is supposed to fail more gracefully though
root@devuan1:/etc# ss -nlt 'sport = 80'
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
root@devuan1:/etc#
Clean new start - no RAID - just sda partitioned ...
https://www.sun2save.com/images/misc1/d … tions1.jpg
After I first saw this nginx error E: nginx-extras: installed nginx-extras package post-installation script subprocess returned error exit status 1 I tried reinstalling nginx from inside Synaptic Package Manager - no joy.
So, I tried this ...
root@devuan1:~# sudo dpkg --configure -a
Setting up nginx-extras (1.18.0-6.1+deb11u3) ...
Starting nginx: nginx failed!
invoke-rc.d: initscript nginx, action "start" failed.
dpkg: error processing package nginx-extras (--configure):
installed nginx-extras package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
nginx-extras
root@devuan1:~# sudo apt-get install -f
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Could not get lock /var/cache/apt/archives/lock. It is held by process 2652 (synaptic)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to lock directory /var/cache/apt/archives/
root@devuan1:~# sudo apt-get install -f
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up nginx-extras (1.18.0-6.1+deb11u3) ...
Starting nginx: nginx failed!
invoke-rc.d: initscript nginx, action "start" failed.
dpkg: error processing package nginx-extras (--configure):
installed nginx-extras package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
nginx-extras
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@devuan1:~#
Any notion as to what's busted and how to proceed, please?
So you only have the chimaera-security repository. Did you not select a mirror during the installation?
Dollars to donuts ... that's it!
I'll restart the process.
I've given up on fussing with the added complexity of RAID.
It should be trivial to just initiate an incremental backup when I make a substantive change - otherwise automate a routine incremental backup every night.
Thanks!
root@devuan1:~# apt policy gparted
gparted:
Installed: (none)
Candidate: (none)
Version table:
root@devuan1:~# apt policy
Package files:
100 /var/lib/dpkg/status
release a=now
500 http://pkgmaster.devuan.org/merged chimaera-security/non-free amd64 Packages
release v=4.0,o=Devuan,a=stable-security,n=chimaera-security,l=Devuan-Security,c=non-free,b=amd64
origin pkgmaster.devuan.org
500 http://pkgmaster.devuan.org/merged chimaera-security/main amd64 Packages
release v=4.0,o=Devuan,a=stable-security,n=chimaera-security,l=Devuan-Security,c=main,b=amd64
origin pkgmaster.devuan.org
500 cdrom://[Devuan GNU/Linux 4.0 chimaera amd64 - desktop 20211012] chimaera/non-free amd64 Packages
release c=non-free,b=amd64
origin Devuan GNU/Linux 4.0 chimaera amd64 - desktop 20211012
500 cdrom://[Devuan GNU/Linux 4.0 chimaera amd64 - desktop 20211012] chimaera/main amd64 Packages
release c=main,b=amd64
origin Devuan GNU/Linux 4.0 chimaera amd64 - desktop 20211012
500 cdrom://[Devuan GNU/Linux 4.0 chimaera amd64 - desktop 20211012] chimaera/contrib amd64 Packages
release c=contrib,b=amd64
origin Devuan GNU/Linux 4.0 chimaera amd64 - desktop 20211012
Pinned packages:
root@devuan1:~# grep -v '^$\^#' /etc/apt/sources.list{,.d/*}
/etc/apt/sources.list:# deb cdrom:[Devuan GNU/Linux 4.0 chimaera amd64 - desktop 20211012]/ chimaera contrib main non-free
/etc/apt/sources.list:
/etc/apt/sources.list:deb cdrom:[Devuan GNU/Linux 4.0 chimaera amd64 - desktop 20211012]/ chimaera contrib main non-free
/etc/apt/sources.list:
/etc/apt/sources.list:deb http://pkgmaster.devuan.org/merged chimaera-security main contrib non-free
/etc/apt/sources.list:deb-src http://pkgmaster.devuan.org/merged chimaera-security main contrib non-free
/etc/apt/sources.list:
/etc/apt/sources.list:# chimaera-updates, to get updates before a point release is made;
/etc/apt/sources.list:# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
/etc/apt/sources.list:# A network mirror was not selected during install. The following entries
/etc/apt/sources.list:# are provided as examples, but you should amend them as appropriate
/etc/apt/sources.list:# for your mirror of choice.
/etc/apt/sources.list:#
/etc/apt/sources.list:# deb http://deb.devuan.org/merged chimaera-updates main contrib non-free
/etc/apt/sources.list:# deb-src http://deb.devuan.org/merged chimaera-updates main contrib non-free
grep: /etc/apt/sources.list.d/*: No such file or directory
root@devuan1:~#
gparted isn't present in the menu, doesn't respond in root (prefixed or not with 'sudo'), and isn't present in Synaptic Package Manager.
(I ran 'reload' in SPM - in case it was a damaged repo list.)
Has it been removed or replaced, or do I just have yet-another bizarre local anomaly?
Devuan chimaera, xfce 4.16.0
I found that my system became unstable if the hardware RAID was toggled on.
I'd gone through the whole process of getting it serving Web pages - then powered off - then on (cold reboot) it displayed mostly-original default settings - but sometimes on a warm reboot it would find all of the newer files and settings.
If you observe some similar instability you may want to go into BIOS and toggle-off the hardware RAID and use only software RAID.
That was the advice given to me on this Forum.
Would something like this sync them?
mdadm --create /dev/??? --level=1 --raid-devices=2 /dev/??? /dev/???
That comes from Step 9 here: https://www.golinuxcloud.com/mdadm-command-in-linux/#9_Create_RAID_1_array_with_mdadm_command
Linux can deal with both, does not make a real difference.
Meanwhile I have adopted the habit to use gpt wherever possible, even if its not really necessary. The advantage is that you do not have to deal with the limitations of the old MSDOS partitioning scheme: not more than 4 partitions. Or you use 3 plus an extended with logical drives in there (i.e. sda5 as first logical partition in an extended), or sometimes one in the middle is missing. gpt is linear, you just count up.
When you look at the two pictures I posted, one before the Disk Partitioner Raid1 setup, and the other after, do they look correct for gpt (though different than for MBR) - or should I wipe the partitions (and any other debris) and begin fresh?
I don't know your hardware or motherboard.
My test machine can do both, old-style BIOS mode and UEFI mode. (My experiences with software RAID1 System-installations in UEFI-mode are quite bad)
For the record, the hardware is a Dell OptiPlex 7050 SFF https://www.hardware-corner.net/desktop … -7050-SFF/
Other than the special requirements of MS version of windows version 11 bloatware, or gamer or video-editing apps, it seems to be fully capable of managing any of the alternative partitioning schemes.
My first priority is stability but I'd like to be able to upgrade the drives to much larger ones, in the future, without the need to re-engineer everything from scratch.
The partitioning app offered to do that and I followed their instructions.
I just used Alt-F2 and fdisk -l /dev/sda
It's showing "Disklabel type: gpt" - even thought I chose MBR.
I'll have to reverse directions and figure out why it's defaulting to gpt.
Maybe a BIOS setting?
EDIT: Or, do I really want to use gpt, instead?
From 2022 https://www.howtouselinux.com/post/mbr-vs-gpt
From 2013 https://www.linux.com/training-tutorial … cient-mbr/
When I used fdisk the stated first partition sector default was 2048 - so I accepted the default. It should be OK.
I'll now need the folks who use RAID to instruct me if I got that part correct as well.
Thanks!
- Enter the Disk Partitioner:
-- Remove any residual config whatsoever There shall be no LVM volumes, no LV Groups, no RAID partitions, just nothing.
-- Create a 512MB primary partition, the first, on each disk and set the type to type fd (Linux RAID). (sda1 sdb1)
-- Create a very big primary or extended partition. the second, on each disk and set the type to fd (Linux RAID). (sda2 sdb2)
-- Go to the RAID submenu of the partitioner and create the the RAID volumes.
(Assemble sda1 and sdb1 to md0, and sda2 and sdb2 to md1)
OK, so I used fdisk to clear out the old and build the new partitions.
That included Type #29 for Linux RAID.
I then returned to the Install and Disk Partitioner.
https://www.sun2save.com/images/misc1/n … tempt1.jpg
I followed the steps there to "create the RAID volumes" ...
https://www.sun2save.com/images/misc1/n … tempt2.jpg
Do things look OK to this point, please?
Sorry dcolburn, I was in a foul mood this morning. My tone was uncalled far and I apologise.
I'm sorry that you're being stressed like that. It's no fun.
All is forgiven. Life is far too short to be unforgiving.
I know I ask a lot of questions and am somewhat clueless when I need to respond accurately - I'm sure it's frustrating to those who really know this stuff.
I'm anxious to get this up and stable so I can restore all the saved work - and get the web hosting back up - then, to finally actually build the intended content.
I feel as though I need the Raid1 so a primary disk failure doesn't take the server down for a long time.
I'm making snapshots to an external USB drive using Deja Dup.
I also have a second computer that's pretty much identical, except that the drives are HDD vs SSD - which I plan to air-gap (if lightning gets into the house it should survive). The plan so to mirror to it daily (but that project is down the road).
So, what do I need to do next to be sure the partitioning on this one is correct, please?
I responded that I created the partition table by following the instructions from Andre4freedom - I didn't know any other way to answer your question. I'm not trying to be difficult - I simply don't know the answers to the level of precision you seek.
As instructed, I'm using the Devuan installer app from the Devuan repo that I burned to a DVD. If it's an awful tool - I have no way to know that. I'm trusting it.
The only thing I know about what I'm doing is that I'm following the instructions from Andre4freedom (see them, posted above).
If those instructions are incorrect then I'll need to start over with better ones. Sigh.
I took a picture of the output from # fdisk -l /dev/sdb ... https://www.sun2save.com/images/misc1/partitioningerror1.jpg
And also
# parted /dev/sdb align-check opt 1
That should say 1 aligned.
When I ran this # parted /dev/sdb align-check opt 1 it asked about optimal or something (it's scrolled out of sight) - I chose the default - then it asked which partition and I entered 4 and it errored.
When I tried this # parted /dev/sdb align-check opt 1 ailgned it scrolled out the Help menu - so I obviously misunderstood what you wrote here. Sorry - a lot of this is new to me.
For such jobs I have a gparted life cd available to boot on usb. Write a new partition table, and then restart the Devuan installer and use manual partitioning.
And to get to another console while installing: use ALT-F2. There you can enter available commands. Back to installer with ALT-F1.
OK, cool, just read this ... will give it a try and report back.
I seem to have a way of breaking stuff so I tend to be over-cautious ...
I think the installer has aligned the disk correctly. Please run my suggested commands to confirm this. I don't post shit like that just for fun...
I appreciate your support.
So, I should go ahead with the instructions until the new install has progressed to where I can access Terminal - then see how things look (using your suggested commands)?
I'm unaware of a way to use Terminal in the middle of partitioning the disks.
Correct alignment in a disk with a 512 byte sector size does require the partitions to start at sector 2048, which is exactly 1MiB (1,048,576 bytes). It most certainly is not "1.0 MB" though.
Check
# fdisk -l /dev/sdb
That should show the first partition starting at sector 2048.
Why would the Devuan install program allow this?
If it won't work why doesn't it error - or just force the leading blank space as it did for sdb?