Posts

Showing posts with the label Apache2

Apache Error "Could Not Reliably Determine The Server's Fully Qualified Domain Name"

Answer : 6# 13.04 and older This is just a friendly warning and not really a problem (as in that something does not work). If you go to: /etc/apache2/apache2.conf and insert: ServerName localhost and then restart apache by typing into the terminal: sudo systemctl reload apache2 the notice will disappear. If you have a name inside /etc/hostname you can also use that name instead of localhost . And it uses 127.0.1.1 if it is inside your /etc/hosts : 127.0.0.1 localhost 127.0.1.1 myhostname Preferred method Troubleshooting Apache If you get this error: apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName then use a text editor such as "sudo nano" at the command line or "gksudo gedit" on the desktop to create a new file, sudo nano /etc/apache2/conf.d/fqdn or gksu "gedit /etc/apache2/conf.d/fqdn" then add ServerName localhost to the file and save. Thi...

Apache, Problem Failed To Start LSB: Apache2 Web Server

Answer : There are two errors: 1. For some reason your /etc/apache2/envvars is missing: from journalctl -xe : Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: /etc/init.d/apache2: 1: /etc/apache2/envvars: envvars: not found Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: /etc/init.d/apache2: 49: /etc/apache2/envvars: envvars: not found Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: /etc/init.d/apache2: 1: /etc/apache2/envvars: envvars: not found Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: /etc/init.d/apache2: 49: /etc/apache2/envvars: envvars: not found ... Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: /usr/sbin/apache2ctl: 1: /etc/apache2/envvars: envvars: not found Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: /usr/sbin/apache2ctl: 49: /etc/apache2/envvars: envvars: not found from systemctl status apache2.service : Jan 11 02:30:46 aleksandr-VirtualBox apache2[8177]: /usr/sbin/apache2ctl: 1: /etc/apache2/envvars: envvars: not fo...

Apache2: 'AH01630: Client Denied By Server Configuration'

Image
Answer : If you are using Apache 2.4 You have to check allow and deny rules Check out http://httpd.apache.org/docs/2.4/upgrading.html#access In 2.2, access control based on client hostname, IP address, and other characteristics of client requests was done using the directives Order, Allow, Deny, and Satisfy. In 2.4, such access control is done in the same way as other authorization checks, using the new module mod_authz_host. The new directive is Require: 2.2 configuration: Order allow,deny Allow from all 2.4 configuration: Require all granted Also don't forget to restart the apache server after these changes ( # service httpd restart ) For all directories write Require all granted instead of Allow from all Update If the above doesn't work then also remove this below mentioned line: Order allow,deny Double check that the DocumentRoot path is correct. That can cause this error.

Cannot Start XAMPP On Ubuntu 11.10

Answer : This is a peculiar error you will get if you run XAMPP in LINUX. Assumption : XAMPP is unzipped @ /opt/ folder. If you get the error "XAMPP: Another web server daemon with SSL is already running" when you run ./lampp start . Simply follow the steps below to get rid of this error: Open the file /opt/lampp/etc/httpd.conf . Search the Listen 80 and change it to some other port (e.g. Listen 2145 ) (Line No. 40). Open the file /opt/lampp/etc/extra/httpd-ssl.conf . Search the Listen 443 and change it to some other port (e.g. Listen 16443 ) (Line No. 39). Open the file /opt/lampp/lampp Search for the port testport 80 and replace it to testport 2145 . Also change the testport 443 to testport 16443 . (Happens to be the Line No. 197, 214) Now go and run /opt/lampp/lampp start . It should work now. Note: Line numbers may be different. I have similar problem and found the issue caused another service already running on port 443 (SSL). Check running l...

Angular Service Worker SwUpdate.available Not Triggered

Answer : You will probably need to tell the service worker to check the server for updates, I usually use a service for this: export class UpdateService { constructor(public updates: SwUpdate) { if (updates.isEnabled) { interval(6 * 60 * 60).subscribe(() => updates.checkForUpdate() .then(() => console.log('checking for updates'))); } } public checkForUpdates(): void { this.updates.available.subscribe(event => this.promptUser()); } private promptUser(): void { console.log('updating to new version'); this.updates.activateUpdate().then(() => document.location.reload()); } In your app-component.ts : constructor(private sw: UpdateService) { // check the service worker for updates this.sw.checkForUpdates(); } For whatever reason, Angular sometimes does not register the service worker properly. So you can modify `main.ts` : Replace: platformBrowserDynamic().bootstrapModule(AppModule); With: p...

Change XAMPP's Htdocs Web Root Folder To Another One

Answer : Open /opt/lampp/etc/httpd.conf change nobody and nogroup <IfModule unixd_module> # # If you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. # # User/Group: The name (or #number) of the user/group to run httpd as. # It is usually good practice to create a dedicated user and group for # running httpd, as with most system services. # User nobody Group nogroup </IfModule> to your username and your group Had the same issue and here is what i did: Run this command to stop xampp: sudo /opt/lampp/lampp stop Open /opt/lampp/etc/httpd.conf Change your_folder to the folder you wanna use DocumentRoot "/home/username/your_folder" <Directory "/home/username/your_folder"> Change User & Group value from daemon to: User nobody Group nogroup set chmod to your_folder with this command sudo chmod 777 /home/username/your_folder Save the file and start xampp wi...