FAQ Database Discussion Community


nginx isn't loading (include additional-hosts/*.conf;) wont change directory? centos7

wordpress,nginx,varnish,php-fpm,centos7
I'm fairly new to Linux and I'm having a little trouble setting up my web server... I am using LEMP with Varnish and phpMyAdmin. The server is running and I can access phpMyAdmin over https etc. Now I'm trying to setup Wordpress on another directory using the include /directory/*.conf; however...

pg gem install fails, cannot find libpq-fe.h header

centos,capistrano,bundler,pg,centos7
Whenever I run bundle install on my VPS (CentOS Linux release 7.0.1406 (Core)) I get an error when installing the pg gem. No pg_config... trying anyway. If building fails, please try again with --with-pg-config=/path/to/pg_config checking for libpq-fe.h... no Can't find the 'libpq-fe.h header *** extconf.rb failed *** Could not create...

How to reboot CentOS 7 with Ansible?

centos,ansible,centos7
I'm trying to reboot server running CentOS 7 on VirtualBox. I use this task: - name: Restart server command: /sbin/reboot async: 0 poll: 0 ignore_errors: true Server is rebooted, but I get this error: TASK: [common | Restart server] *********************************************** fatal: [rolcabox] => SSH Error: Shared connection to 127.0.0.1 closed....

Cannot disable systemd service

linux,dbus,centos7,systemd
I've been using the dbus API from systemd and I've been enabling services with the EnableUnitFiles() function as detailed here http://www.freedesktop.org/wiki/Software/systemd/dbus/ However, when I try to disable the same service with the command systemctl disable "service_name" and follow-up with a check to see if the service is disabled with systemctl...

Cloud Init Fails to Install Packages on CentOS 7 in EC2

amazon-ec2,centos7,cloud-init
I have a cloud config file defined on my EC2 instance in the user data. Many of the parts/actions are run by the server properly, but package installation seems to fail invariably: #cloud-config package-update: true package-upgrade: true # ... packages: - puppet3 - lvm2 - btrfs-progs # ... I see...

how to allow remote access of mysql and test the connection (Centos 7)

php,mysql,centos7
I have already followed the following link to setup the MySQL server in CentOS 7. How to allow remote connection to mysql However, by commenting out "bind-address = XXX.XXX.XXX.XXX" in /etc/my.cnf , it does not work at all. the mariadb cannot be restarted. systemctl restart mariadb Should I work on...

SMTP (port 25) Plesk 12 on CentOS 7 “None of the authentication methods supported by your server”

smtp,port,plesk,centos7,smtp-auth
I have just moved my server to OVH Dedicated server and now having a problem with SMTP, which I need a bit of help with. SMTP is set on port 25, but when I am setting up my email client (MS Outlook 2010 or Android Email Client) I have notification...

Installing GNOME Desktop on Centos 7 minimal : Docker image

docker,gnome,centos7
I have installed GNOME Desktop in Centos 7 minimal Docker image using the following command. yum groupinstall "GNOME Desktop" "Graphical Administration Tools" . I enabled the GUI Instance by: ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target I am unable to access the GUI mode. Can anyone guide how to do it?...

nginx how to make apache like virtual host?

nginx,centos7
I have this configuration in my CentOS 7: $ cat /etc/nginx/conf.d/default.conf server { listen 80; server_name 8.8.8.8; root /usr/share/nginx/html; index index.php index.html index.htm; location / { try_files $uri $uri/ =404; } error_page 404 /404.html; error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } location ~ \.php$...

lxc-clone not working with overlayfs in centos 7

linux,overlay,lxc,centos7
I have created a container say base and I am trying to create a clone of the base container with backing store as overlayfs. But it always fails with the following error, lxc_container: bdev.c: overlayfs_mount: 2237 No such device - overlayfs: error mounting /var/lib/lxc/base/rootfs onto /usr/lib64/lxc/rootfs options upperdir=/var/lib/lxc/s0/delta0,lowerdir=/var/lib/lxc/base/rootfs,workdir=/var/lib/lxc/s0/olwork clone failed...

FastCGI script can't find libfcgi.so.0 in Apache 2.4.6 and mod_fastcgi

c,apache,centos7,mod-fastcgi
This is my simple hello-world FastCGI script written in C. #include "fcgi_stdio.h" #include <stdlib.h> void main(void) { int count = 0; while(FCGI_Accept() >= 0) printf("Content-type: text/html\r\n" "\r\n" "<title>FastCGI Hello!</title>" "<h1>FastCGI Hello!</h1>" "Request number %d running on host <i>%s</i>\n", ++count, getenv("SERVER_NAME")); } It works fine if I compiled it using static...

How to configure gitlab to use existing postgres server

postgresql,nginx,gitlab,centos7
When installing Gitlab by default Nginx and Postgres .. among other things are installed regardless of whether you have them already or not. So since I have these two already, I am trying to configure gitlab to use them, I have done this for Nginx, Using: $ vi /etc/gitlab/gitlab.rb: #...

CentOS, Node.js, init.d, ENOENT, Can't open or write to log files on system reboot when app started automatically

node.js,init.d,centos7
I have a Node.js service script that must be executed when my CentOS 7 server is booted. I utilized an init.d template to create a startup Daemon. The init.d script works perfectly if I am logged into the server as root and execute the script manually in the terminal using:...

Centos 7 rsyslog not logging remote messages

rsyslog,centos7
I've setup a remote rsyslog server for testing but I can't seem to get it to log from a remote system. I have an app on my desktop (windows) called "Syslog Test Message Utility 1.0" which sends test syslog messages on UDP 514. I see the message appear on my...

Apache 2.4 and php-fpm does not trigger apache http basic auth for php pages

apache,proxy,php-fpm,fcgi,centos7
I am sure this is a question which has been asked somewhere, if so excuse me, but googling around did not give me anything tangible. Here is my scenario: I am protecting a web directory with apache http basic auth. So I have my .htaccess in the root folder and...

sudo apachectl restart Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details [closed]

linux,apache,httpd.conf,centos7
Before my question gets torn apart I have already checked to see if SELinux was disabled and it is and sudo apachectl restart is not working. I ran into a problem let me start by saying I am a noob, When I ran "sudo apachectl restart" it gave me an...

recommended way to configure a centos-7 host with static network settings via ansible?

ansible,ansible-playbook,centos7,rhel7
I'm new to ansible and a little googling hasn't lead me quickly towards the right solution to my question. What's the 'with the grain' way to assign static network settings to a centos-7 host with ansible. I feel like this must be a pretty common need -- and there must...

File Permissions Using Dropzone.js

symfony-1.4,dropzone.js,centos7
When I upload files to my uploads directory using dropzone.js, they are automatically assigned a read-only status. The uploads directory and the actions directory where the file upload is executed (I'm using symfony 1.4 in centOS 7) have drwxrwxrwx and drwxrwxrwx. permissions respectively. I am also the owner of the...

How to analyze httpd (apache webserver) logs in CentOS 7

apache,logging,analyzer,centos7,nanohttpd
I have configred a static IP on my server that is using CentOS 7. Here httpd is the webserver. Now I have to analyze following things. Total number of queries per day (or toall) Total requests sent and served. Unique visitors details List of queries recieved. (status etc.) HOSTs/OS/Browsers that...

What benefit do I get from JSVC over just using systemd?

java,tomcat,centos7,systemd,jsvc
The Tomcat documentation describes the process of compiling and installing JSVC which can be used to run Tomcat as a daemon. As per my understanding, JSVC has two benefits: It launches as root allowing for the use of a privileged port (like 80 or 443). It creates a "controller process"...

How do I remove the Centos 7 Desktop (Hot Corner) top right effect?

linux,desktop,centos7,gnome-3,gnome-shell
So I have a fresh install of Centos 7 Desktop version. It uses gnome 3.8 and I have multiple monitors. When I go left to right with my mouse on the top portion of the screen, it shows me all my open windows, side by side. I can also hit...

Centos 7 and systemd: CPU Quota?

centos,centos7,systemd,cgroups,resource-scheduling
OS Version Information: [[email protected] system]# cat /etc/redhat-release CentOS Linux release 7.1.1503 (Core) Configuration for the test.slice is as follows: [[email protected] system]# cat test.slice [Unit] Description=Test Slice Documentation=man:systemd.special(7) DefaultDependencies=no Before=slices.target Wants=-.slice After=-.slice [Slice] CPUAccounting=on CPUShares=1024 I created another file just like this (call it testhigh.slice) and gave it CPU shares =...

SELINUX blocking php-fpm and nginx working together?

linux,nginx,php-fpm,selinux,centos7
I'm having some issues with SELINUX. When trying to visit my website I get 403 forbidden from nginx and the server pops up with an error and says to use grep NGINX /var/log/audit/audit.log | audit2allow -M mypol which i did however, when trying to load the page it now says...

CentOS memory availability

java,memory,centos7
My system has 8GB ram and my system is CentOS 7. The system info shows the following memory usage. Memory Information Total memory (RAM): 7.6 GB Free memory: 143.4 MB (+ 6.1 GB Caches) Free swap: 7.8 GB Does this mean free memory is only 143.4MB, or 143.4 + 6.1BG?...

How to stop Centos 7 Desktop returning to Login Screen after a successful login?

linux,login,centos,centos7,gnome-3
So I just did a fresh install of Centos 7 with the desktop. After the install, I installed my development environment and when to attach my windows ssd, but was told it needed to be shutdown instead of hibernation. So I restarted my system, booted into windows, and hit shutdown....

Php has its own /tmp in /tmp/systemd-private-nABCDE/tmp when accessed through nginx

php,nginx,centos7,tmp
I found strange behaviour concerning php and /tmp folder. Php uses another folder when it works with /tmp. Php 5.6.7, nginx, php-fpm. I execute the same script in two ways: via browser and via shell. But when it is launched via browser, file is not in real /tmp folder: <?php...

CHMOD 777 on Directories for Database to be Able to Write (Help Me Understand)

mysql,wordpress,file-permissions,user-permissions,centos7
I have a limited understanding of MySQL's interaction with my CentOS 7 server and need some help. Basically, I have a WordPress installation and I need to set the uploads directory and all directories within to CHMOD 777 to upload images via the backend. CHMOD 775 doensn't work though. This...

Failed to open stream on file_put_contents in PHP on CentOS 7

php,apache,centos,centos7
I know this is a common bug with many threads but I'm tired of searching and I still haven't solved it. When I try to run the function file_put_contents I get the following error: Warning: file_put_contents(test.txt): failed to open stream: Permission denied in /var/www/html/nurses/adminWriter.php on line 29 I've already done...

Apache/CentOS 7: /var/www/html/ owned by root but created files owned by apache - how do I resolve this?

php,apache,chown,centos7,chgrp
I have a fresh, unmodified install of Apache on CentOS 7. I notice that when I look at the folder permissions for /var/www/html it and it's content is owned by apache. When a file is created, however, its owner and group is Apache. Though html is owned by root:root, should...

How to enable mod_rewrite on Apache 2.4?

php,wordpress,apache,mod-rewrite,centos7
I'm using Wordpress and wanted to enable pretty urls feature, but they don't work, i'm thinking that it's because of mod_rewrite, but i don't know how to enable it on Apache 2.4 under CentOS 7... I've already try this: grep -i LoadModule /etc/httpd/conf/httpd.conf | grep rewrite but nothing... Also would...

Why CentOS lost its network interface?

centos,centos7
I have a CentOS 7 VPS which I had multiple sites on its Apache, and these days I faced a strange problem, CentOS lost its interface many times a day! and I should restart the interface to recover this situation! I've take a snapshot from Web console interface of my...

VPS rbenv location directory is wrong when using Capistrano3

ruby-on-rails,rbenv,capistrano3,centos7
My Centos 7 has rbenv located in /root/.rbenv, but when I run cap production deploy:setup_config it searches rbenv inside /usr/local/rbenv. Error Message DEBUG [6a1407a4] Running /usr/bin/env [ -d /usr/local/rbenv/versions/2.2.0 ] as [email protected] DEBUG [6a1407a4] Command: [ -d /usr/local/rbenv/versions/2.2.0 ] DEBUG [6a1407a4] Finished in 6.403 seconds with exit status 1 (failed)....

DF doesn't show swap partition

memory,centos7
I am using DF to check my disk usage and partition. Why doesn't it show my swap partition? I have 8GB for swap when I installed CentOS 7. [email protected] abigail]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/centos-root 196G 30G 166G 16% / devtmpfs 3.8G 0 3.8G 0%...

OpenVAS commands getting Failed Authentication error

authentication,centos,centos7,openvas
while trying to run some of OpenVAS CLI commands, i'm getting Failed Authentication error message. OpenVAS is installed on CentOS machine. I tried with the user account credentials but still getting the same error message.Is there any way to over come this problem?

Graphicsmagick Image Comparison threshold value

gruntjs,graphicsmagick,centos7
I am using grunt for my test bed setup and currently it would generate bunch of screenshots for a given test case and it then compares those screenshots against the benchmarks I already stored in a different repository using graphicsmagick. But there seems to be minor difference in the screenshot...

Why is SED echoing rather than editing: sed '/^;text1/!b;:a;n;//ba;i\text2' [duplicate]

string,bash,sed,centos,centos7
This question already has an answer here: How do I use a new-line replacement in a BSD sed? 3 answers sed '/^;date.timezone =/!b;:a;n;//ba;i\date.timezone = Europe/London' /etc/php.ini You can probably guess Im creating a script for setting up LAMP servers. In the above example the text is not replaced but...

EC2 root volume expansion for CentOS7

linux,amazon-web-services,amazon-ec2,centos,centos7
My EC2 is running with CentOS 7 HVM community image which comes default as xfs file system, and I had a root volume with 10GB which I extended to 15GB after detaching > creating snap > reattaching to /dev/sda1 but I noticed that I did not had to run any...

Segment Fault with rails runner (Rails 4.0.0 Ruby 2.2.2p95 CentOS7)

ruby-on-rails,c,ruby,ruby-on-rails-4,centos7
This error is completely beyond me and if it needs to be put somewhere else, please let me know. For similar reasons I also don't know what is in the 'scope' of this problem, so if you need anymore information please let me know. As far as I can tell,...