Can't login to Tomcat 8 manager after multiple troubleshooting steps were made - authentication

I'm facing an apparently common issue: I can't manage to login in a recently installed Apache Tomcat 8.
The Tomcat installation is part of a large system comprised of a database and other apps and it's not the first time I've installed it just as it isn't the first time I faced this problem. Being so, I did all the steps that helped me fix the problem the other times based on countless pages I found on the web and here on SO about this problem:
Accessed the user XML file and gave all permissions, especially manager-gui, to my created login with no empty spaces between commas
Changes in the XML file were proceeded by closing it in Notepad++ to avoid app locking the file
Changes in the user XML file were preceded by shutting down the service in Windows Services and turning it up again after changes were made
Login and password were set and changed multiple times to be sure it wasn't any kind of mistyped information
The access port in server.xml was changed to more than one different option to be sure there wasn't any port conflict with another app (unlikely since the Windows Server running the app is practically clean)
The read permissions of the user XML file were checked and are in place.
And of course, I reinstalled it at least once.
And maybe more troubleshooting steps I can't remember right now. And none of this worked.
So I'm asking: which other steps could I do to try to access the Tomcat Manager (localhost:port/manager) from a web browser (Chrome/Firefox) from within the same machine it is installed? (no NetBeans involved) I can't think of any other solution.

Well I finally managed to access the manager after appealing to the last resort I had forgot to do: copy and paste of the entire conf folder from a Tomcat which was working to the one having the problem and even so it didn't work by itself, since I still had to change the port from 8080 to 8088 for it to finally work. It seems, therefore, it was a "binary problem": the port wasn't adequate plus differneces in configuration. Comparing the files, I managed to find small differences for example in the web.xml files:
*Current, working*
<mime-mapping>
<extension>woff</extension>
<mime-type>application/x-font-woff</mime-type>
</mime-mapping>
*Previously, not working*
<mime-mapping>
<extension>woff</extension>
<mime-type>font/woff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>woff2</extension>
<mime-type>font/woff2</mime-type>
</mime-mapping>
I can't understand why changes such as this one made any difference, but at least it's working. Thanks for the help.

Related

Easy Hosting Control Panel creates multiple backup

I have a server that's running Ubuntu 16.04. and apparently Easy Hosting Control Panel keeps on creating multiple back-ups like 50 times a day which fills the 50 gb disk space and it's causing the server to crash.
The backup is creating multiple directories named Apache2.backupbyehcp inside /etc directory.
I've tried deleting the backups one by one and after a day there it is again.
I want to disable or limit the backups created.
Any help is greatly appreciated.
Here's a screen shot of the backup directories that are being created:
This is caused by:
Ehcp trying to recover webserver config, each time it detects that the webserver config is broken or webserver not responding.
This may result in such unexpected/unwanted behaviour.
What to do:
1st, check the problem in webserver configs, like, tail -f /var/log/ehcp.log
so that you can understand what is going wrong.
This is sometime caused by incorrect webserver custom configurations by admin or reseller. You may disable custom webserver configs via ehcp gui-> options.
(I strongly suggest finding the cause of this.)
If everything regarding the webserver is okay, but you just need to disable this backup,
open install_lib.php in ehcp dir, search for backupbyehcp and disable that line.
Hope this helps.

(MacOS Server) Apache File Extension Questions

I am running into some sort of issue when trying to access my local website:
Forbidden
You don't have permission to access /index.html on this server.
Apache Server at ffghost.local Port 34580
I'm using macOS X Server 5.2 with Apache 2.4.18. OS X Server automatically creates two default websites (one on port 80 and one on port 443). I created a new website. It was my understanding that Apache would redirect from the default site to the created site automatically once created. This didn't happen. So, in an attempt to begin de-conflicting I replaced the files where the default site was located with the new website files and all of the sudden am getting the above 404 message.
I have read a lot of possibilities as to why this may be happening. I've run a syntax checker for Apache in terminal and terminal says syntax is ok. So from there I was going to check into the config files, but there are several, and I just want to know the gist behind them.
There seem to be about 4 file extension types. I don't know what they all mean or if they are active.
.config (I'm assuming this is the active file)
.config.prev (I'm assuming this is a previous version or copy of an active config file and is no longer active)
.config.orig (original file? and is no longer active)
.config.default (???)
Also, OS X Server and Apache seem to have the same files in two different places and I'm a little confused on which one to change. If I change one of them will it be reflected in the other? Do I need to change both of them? Additionally, I don't have DNS set up and am unsure if that was the original issue of not pulling up the new website over the default site.
You are mixing several aspects in your question which makes it complicated to give a helpful answer. For example, you say you get Forbidden when accessing your site, but later you mention a status 404. The former might be due to configuring a user group being allowed to access the site, while the latter just means Not found.
As to your actual question about the config files:
The file just ending in .conf is the one that is being used.
However, the Server app uses a lot of of different config files which might be relevant:
Path /Library/Server/Web/Config/apache2 contains the general config files
httpd.conf - general Apache configuration
httpd_server_app.conf - more general configuration
the other files contain configurations for specific applications or webapps (the latter being defined in plist files in /Library/Server/Web/Config/apache2/webapps)
Path /Library/Server/Web/Config/apache2/sites contains config files specific to your websites. They are named something like 0000_127.0.0.1_34543_your.domain.name.conf where 34543 is the configuration for the https (SSL) port, while 35480 would indicate the http port. There is also a file like 0000_127.0.0.1_34543_.conf (no domain name in the file name) which defines the default site.
In addition to these, there are two more configuration file in /Library/Server/Web/Config/proxy which configure the proxy services.
It is not recommended to manually adjust the config files, except for those in the sites subdirectory, because they may get overwritten by the Server app or when updating the Server app.
Important: If you change the files manually, you must re-start the Apache server in order to make the changes effective. Use sudo serveradmin stop/start web to do so.
However, I do not know of a detailed documentation of of all these files, so I try to stay on the safe side and possibly not edit the general config files (only those in sites). I also recommend to write down any manual changes, so they can be reapplied if necessary.
Without exactly knowing what you configured in the Server app and which files you changed how, I'm afraid it is impossible to say what might have gone wrong. I recommend to start all over by removing and re-adding the web sites.

Apache won't stop using old project files / refuse to remove old cache

I am using Apache httpd on localhost to connect to the project I'm working on, I have been deleting web cache when website is showing the old project instead of the new one. However recently the project is stuck on an outdated version and restarting/clearing cookies won't work with the user I'm assigned.
I tried using another user with my project and it works just fine. I recently did use svn revert which may have caused my user to get stuck with old project, but I'm not sure that's the problem.
Commands I use to start and stop:
sudo service httpd start
sudo service httpd stop
Any advice or tips are greatly appreciated.
Update: I managed to get the page to update the html, however my JavaScript won't load which I suspect is due to another user being stored and thus not accessing the database I use which leads to nothing being generated.
(Posted on behalf of the OP).
I got everything to "work" again by accident, I made some edits to PHP and my PHP crashed because of a syntax error. When I fixed it back to original stage it was working again. It most likely is related to a user the previous owner created that caused the problem.
Just clear Temporary files
In windows CTRL+R and type %temp% and delete all the files it will help to you

"Undefined" labels and buttons in the UI of SuiteCRM

A fresh installation, installed via an installer (Softaculous, to save time.)
Data seems to be correctly connected and all in the correct places. But most error messages only contain the word "undefined."
I have a feeling it's a permission problem, but the various solutions for it on forums are varied and only seem to work for a small section of people for each.
I'd rather not do a reinstall as all the old data from previous CRM is now imported.
This is running through a cPanel controlled server BTW, if that helps matters.
Yes, It's permission issues. Please update write permission for the web server user and try to delete " cache/jsLanguage/en_us.js " folder from your account.
If a Suite or Sugar install is installed on a temporary I.P whilst using cPanel, at least in our version of cPanel, it hosts the files in a temporary test folder.
Suite (specifically SugarBean.php) tries to access the folders that would exist on permanent domains. So it calls files that are hosted elsewhere on the server.
Soon as the site was pointed to a real domain, it fixed itself, no extra steps necessary, as the files were hosted in the correct place.
Thanks to the hosting company, they explained that to me. I'm not sure if that's standard procedure to store the files differently for temporary i.p addresses.
make sure you are using correct .htaccess
Go to Admin > Repair and do a "Quick Repair & Rebuild". Execute any changes shown at the bottom of the page.
If that doesn't work, go to Admin > Repair and do "Rebuild .htaccess file" and afterwards, Admin > Repair and do a "Quick Repair & Rebuild" again.

Fileupload with CMIS + Apache fails due to "Proxy Error"

We developed a web application which uses opencmis and a windows client which uses dotcmis. The web application runs behind an apache httpd.
We are facing the following problem:
Small files can be uploaded by the client without problems (< 1,5 gigabytes).
However, if we try to upload larger files, we get a "Proxy Error". The stacktrace does not give any more information.
We also tried to upload via cmis workbench with the same result...
Are there any configuration parameters for apache we maybe overlooked? Or do you think the problem should be searched elsewhere?
EDIT: I should mention, that the file is uploaded completely nevertheless. And also: We tried disable apache, connect via http instead of https and upload a file and it works perfectly.
EDIT2: We found a solution, although it does not seem to be a very good one... We set the following configuration entries in httpd.conf:
Timeout=500 and ProxyTimeout=500. Default value is 60 for these entries.
This solved the problem. However, it would be nice to know, why this problem occures in the first place.
Greets