fail2ban not reading symlinked jail config file in AlmaLinux 8.6 - fail2ban

I have basic fai2ban service installed in my AlmaLinux8.6 server. I have created one filter file and one jail file at location /var/www/fail2ban.
Now I created a symlink of the filter file at /etc/fail2ban/filer.d/somefilter.conf and I created a symlink of the jail file at /etc/fail2ban/jail.d/somejal.conf.
Now while I restart my fail2ban service it gives the error Sorry but the jail 'email-tactic-blacklist' does not exist. But if I directly create those files at directories /etc/fail2ban/filter.d and /etc/fail2ban/jail.d, it works fine.
Don't know why fail2ban is not reading symlinked config files.

Related

Extract ZIP file in specific folder on server using terminal?

I have a problem with my VPS server, more precisely with extracting a .zip file (5GB) through the file manager. I have limited support because it is a self-managed VPS. I need a command for a terminal to extract file "5.zip" to a specific server dir for ex: http:xxxxxxx.com/funny folder on my server. Can someone help me with this? Thanks.
You provide URL, not path to directory. But to extract zip file in particular directory you can use command:
cd /directory/funny
unzip /path/to/5.zip
Change /directory/funny with the real directory which your web service serve.

Deploying a Static website on Server

I am trying to built a static website using godaddy server. I created a folder say Manage inside public_html in which there is an index.php. Now when I am trying to open this page on browser with URL "www.mysite.com/Manage/index.php" It is showing error, File not found, 404 error. So what possible error I might be making?
There could be a few reasons. If you are using an RHEL-based distribution for your server, you need to edit the master Apache configuration file /etc/httpd/conf.d/userdir.conf and change two things:
Change UserDir disabled to UserDir disabled root
If #UserDir public_html is commented change it to UserDir public_html
This tells Apache that the directory containing each user's html files is a subdirectory of their home directory called public_html.
You may also need to change the permissions of your user directory and your public_html directory to allow Apache to read and execute inside them. To do this, run the following commands:
sudo chmod o+x /home/myusername
sudo chmod o+rx /home/myusername/public_html
Restart Apache and see if it works.
The source for this knowledge is not my brain. It comes from the wonderful course at Washington University in St. Louis CSE 330 Rapid prototype development.
At first look to error.log. If you use nginx find in /var/log/nginx, if httpd in /var/log/httpd.
And what do you mean about "static"? PHP preprocessor generate html from *.php files, so you index.php is not static.
For this case you need to setup LAMP stack.

Error while copying war file from workstation to client node?`

Hi I am using chef for deployment, I have created a war file on my chef workstation and copied it to my templates folder of cookbook
now I have written a simple recipe to copy it to my client here is the recipe
template "/opt/tomcat7/webapps/SampleProject.war" do
source "SampleProject.war"
end
Now if I run the recipe from my chef-workstation using knife ssh it is unable to copy the war file
knife ssh 'name:staging2.akosha.com' 'chef-client' -x root -P
but if I give some other file like *.txt it copies the file successfully.
I haven't seen a reference for that anywhere, but you shouldn't use the template resource for binaries - the same happened to me also. It seems that the erb-processing flips some bits.
Instead, use the cookbook_file resource, or better the remote_file, to avoid polluting your Chef server with large artifacts (which do not really belong there).

Mule Server - application code to be deployed in standalone folder

Our Mule 3 server is installed at "/mule/instance0/" on our UNIX server and the application is deployed under "/mule/instance0/apps/" folder. We have been deploying a zip file into the "/mule/instance0/apps/" folder and application runs fine.
There is a new requirement to deploy the application zip file in a folder other than "/mule/instance0/apps" folder (say "/tmp"). We tried looking for the changes that need to be made and they were rather humongous. Does anybody know of a simple config change to pick the application code from a folder other than "/mule/instance0/apps" ?
Thanks,
Midhun
You can make apps directory a symbolic link to tmp: $cd $MULE_HOME; rm -rf apps; ln -s /tmp apps

Deployment Issue In Symfony2 - Can't Find Registered Bundles?

I'm transferring my project from the laptop to a test/production server. I'm copying the files to the server via FTP. So far, I can access the /web/config.php file and /web/app_dev.php files alright.
However, when I go to try and load a page it comes up with the following error:
ReflectionException: Class Knp\Menu\ItemInterface does not exist
In the error report, all the files look to be held in the following root directory:
/var/www/vhosts/domain.co.uk/subdomains/dev/httpdocs/
On the laptop however, the root directory was www:
C:\wamp\www
Everything on the test server is held in the httpdocs folder. What do I need to do to fix this error?
Cheers
EDIT:
I have moved everything in to a www folder, held within httpdocs folder. It's completely broken doing that, no pages will load.
The issue occured from an incorrectly configured .htaccess file on the development server.
During the configuration, the root directory wasn't changed to /web. Once this was changed however, the plugin worked.