Posts for: #CentOS

NextCloud with Apache behind NGINX reverse proxy on CentOS

This is probably useful to figure out how to reverse proxy Apache behind NGINX, but I was finally able to get NextCloud working on NGINX with no problem I like to use NGINX as my web server because that’s what I’ve always worked with. I’ve tried a couple times to get NGINX to work with NextCloud, but it would also end up not letting me log in. I did some Googleing and I guess it has something to do with how the cache is handled in NGINX.
MORE →

Static IP KVM Guest

Copied from Here If you don’t want to do any configuration inside the guest, then the only option is a DHCP server that hands out static IP addresses. If you use bridge mode, that will probably be some external DHCP server. Consult its manual to find out how to serve static leases. But at least in forward modes nat or route, you could use libvirt’s built-in dnsmasqd (More recent versions of libvirtd support the dnsmasq’s “dhcp-hostsfile” option).
MORE →

Add clonezilla to Fog Project

mkdir /var/www/html/fog/cz Download iSO and extract to /var/www/html/fog/cz Go to Fog Configuration > iPXE New Menu Entry Give it a menu item name Add the below to “Parameters” :Clonezilla echo Starting CloneZilla with default options kernel http://IP/fog/cz/live/vmlinuz initrd http://IP/fog/cz/live/initrd.img imgargs vmlinuz initrd=initrd.img boot=live username=user union=overlay config components quiet noswap edd=on nomodeset nodmraid locales= keyboard-layouts= ocs_live_run=“ocs-live-general” ocs_live_extra_param="" ocs_live_batch=no net.ifnames=0 nosplash noprompt fetch=http://IP/fog/cz/live/filesystem.squashfs boot || goto MENU Now it should work.
MORE →

How to use SSH keys

create public and private keys. You can just hit enter or change the options. ssh-keygen -t rsa Now we need to copy our public key to the servers authorized keys cat ~/.ssh/id_rsa.pub | ssh [email protected] "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys" Now once you’ve completed teh above you should just be able to ssh to the remote host. If you want to be able to ssh as root.
MORE →

Add Linux Mint to Active Diretory

First we are going to become root sudo su Next we are going to join the realm. This should installed everything needed after you run the command below realm join domain.com --user domainadmin Permit all users to log in. realm permit --all Add user group as root nano /etc/sudoers Paste into above file %groupname@domain ALL=(ALL:ALL) ALL Allow sssd to create user directory nano /etc/pam.d/common-session Paste into above file session optional pam_mkhomedir.
MORE →

Install php7, nginx, mariadb centos 7

I am not a pro, this is just what I’ve learned over the years and noticed that a bunch of tutorials didn’t have all the info I needed/used so I figured I’d make my own. rpm -Uvh https://rpms.remirepo.net/enterprise/remi-release-7.rpm yum update yum install -y nginx mariadb-server mariadb git yum --enablerepo=remi-php72 install php-fpm php-common php-opcache php-pecl-apcu php-cli php-pear php-pdo php-mysqlnd php-pgsql php-pecl-mongodb php-pecl-redis php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml php-pecl-zip php-gmp Next we are going to want to enable everything to run on start up systemctl enable php-fpm systemctl enable nginx systemctl enable mariadb systemctl start mariadb
MORE →

Make nginx return 403 error when accessing non defined sites or direct IP

I was running into an issue where when people would go to the IP of my server or a domain was pointed at my server and the domain wasn’t configured in NGINX it would for some reason redirect to one of my domains when I didn’t want it to. Below is the config block that I added to a file. This make NGINX return a 403 error when accessing the server via IP or an reconfigured domain.
MORE →

Comments: