Posts

Showing posts with the label Apache

Apache Virtual Host Always Redirecting To /dashboard

Answer : Put this as the first line in C:\...\httpd-vhosts.conf (and restart the web server): NameVirtualHost *:80 So, it should look like this: NameVirtualHost *:80 <VirtualHost *:80> ServerName localhost DocumentRoot "C:/xampp/htdocs" </VirtualHost> <VirtualHost *:80> ServerName walkpeakdistrict.local DocumentRoot "C:/xampp/htdocs/walkpeakdistrict_uk/public" </VirtualHost> I would place all my projects somewhere outside of C:/xampp/htdocs and C:/xampp . Let C:/xampp/htdocs be the standard localhost location, with just two files inside (simple index.php and index.html ), but use another one for the projects. Even better, use another partition, not the system partition C: . Like D:/projects , or so. So, you would have D:/projects/walkpeakdistrict_uk . Good luck. Ok, I'm not sure why this was an issue but it seems to work when I change the virtual host's server name to anything other than ".loca...

Apache Could Not Be Started - ServerRoot Must Be A Valid Directory And Unable To Find The Specified Module

Answer : Just run setup_xampp.bat from shell (shell from XAMPP control panel)and the paths should be set automatically for the portable version of XAMPP for windows. It has worked for me. navigate to httpd.conf file in conf direcotry in Apache24 or whatever apache file you have. Go to ServerRoot= ".." line and change the value to the path where apache is located like "C:\Program Files\Apache24" If you open an editor and jump to the exact line shown in the error message (within the file httpd.conf ), this is what you'd see: #LoadModule access_compat_module modules/mod_access_compat.so LoadModule actions_module modules/mod_actions.so LoadModule alias_module modules/mod_alias.so LoadModule allowmethods_module modules/mod_allowmethods.so LoadModule asis_module modules/mod_asis.so LoadModule auth_basic_module modules/mod_auth_basic.so #LoadModule auth_digest_module modules/mod_auth_digest.so #LoadModule auth_form_module modules/mod_auth_form.so The paths t...

Apache Httpd Build From Source: Fatal Error: Expat.h: No Such File Or Directory

Answer : Download expat-2.2.6.tar.bz2 from https://libexpat.github.io/. Extract expat using following command tar xvjf expat-2.2.6.tar.bz2 -C /path-to-dir Change to the extracted expat directory. Build expat using following commands ./configure --prefix=/path-to-expat-installation-dir make make install While building Apache Httpd from source specify --with-expat ./configure --with-included-apr --prefix=/path-to-apache-installation --with-expat=/path-to-expat-installation-dir Do you have the expat library installed? (Because that's where the expat.h comes from.) https://libexpat.github.io/ If you cannot install it globally to the system, I'm sure Apache's ./configure script must have an option to support a custom location for the library as well.

Adding VirtualHost Fails: Access Forbidden Error 403 (XAMPP) (Windows 7)

Answer : Okay: This is what I did now and it's solved: My httpd-vhosts.conf looks like this now: <VirtualHost dropbox.local:80> DocumentRoot "E:/Documenten/Dropbox/Dropbox/dummy-htdocs" ServerName dropbox.local ErrorLog "logs/dropbox.local-error.log" CustomLog "logs/dropbox.local-access.log" combined <Directory "E:/Documenten/Dropbox/Dropbox/dummy-htdocs"> # AllowOverride All # Deprecated # Order Allow,Deny # Deprecated # Allow from all # Deprecated # --New way of doing it Require all granted </Directory> </VirtualHost> First, I saw that it's necessary to have set the <Directory xx:xx> options. So I put the <Directory > [..] </Directory> -part INSIDE the <VirtualHost > [..] </VirtualHost> . After that, I added AllowOverride AuthConfig Indexes to the <Directory> options. Now htt...

Apache: Client Denied By Server Configuration

Answer : Apache 2.4.3 (or maybe slightly earlier) added a new security feature that often results in this error. You would also see a log message of the form "client denied by server configuration". The feature is requiring an authorized user identity to access a directory. It is turned on by DEFAULT in the httpd.conf that ships with Apache. You can see the enabling of the feature with the directive Require all denied This basically says to deny access to all users. To fix this problem, either remove the denied directive (or much better) add the following directive to the directories you want to grant access to: Require all granted as in <Directory "your directory here"> Order allow,deny Allow from all # New directive needed in Apache 2.4.3: Require all granted </Directory> OK I am using the wrong syntax, I should be using Allow from 127.0.0.1 Allow from ::1 ... In Apache 2.4 the old access authorisation syntax has been depr...

Apache Is Not Running From XAMPP Control Panel ( Error: Apache Shutdown Unexpectedly. This May Be Due To A Blocked Port)

Answer : There are many possible answers for this problem. The most common and most likely is that you're running another program which is blocking port 80 or 443. If you've installed Skype, then you've found your problem! Change apache's port settings to 81 and apache will work. There's a good tutorial on that To check this you can open up your command line by clicking the start menu, and typing 'cmd', and enter the command netstat -nab this wil return a list of programs that will vaguely resemble this pattern [someprogram.exe] UDP [fe80::numbers:numbers:numbers:numbers%numbers]:portnumber You need to find a line (or lines) ending in :80 and terminate them in order to start apache. If there is no line ending in :80, there are more things you can do. First, navigate to xampp's directory (default is c:\xampp) and double click apache_start.bat. This will open up a comand line and return more detailed errors about why apache can...

Apache Gives Me 403 Access Forbidden When DocumentRoot Points To Two Different Drives

Answer : You did not need Options Indexes FollowSymLinks MultiViews Includes ExecCGI AllowOverride All Order Allow,Deny Allow from all Require all granted the only thing what you need is... Require all granted ...inside the directory section. See Apache 2.4 upgrading side: http://httpd.apache.org/docs/2.4/upgrading.html Somewhere, you need to tell Apache that people are allowed to see contents of this directory. <Directory "F:/bar/public"> Order Allow,Deny Allow from All # Any other directory-specific stuff </Directory> More info For Apache 2.4.2 : I was getting 403: Forbidden continuously when I was trying to access WAMP on my Windows 7 desktop from my iPhone on WiFi. On one blog, I found the solution - add Require all granted after Allow all in the <Directory> section. So this is how my <Directory> section looks like inside <VirtualHost> <Directory "C:/wamp/www"> Options Indexes Follow...

Apache POI AutoSizeColumn Resizes Incorrectly

Answer : Just to make an answer out of my comment. The rows couldn't size properly because Java was unaware of the font you were trying to use this link should help if you want to install new fonts into Java so you could use something fancier. It also has the list of default fonts that Java knows. Glad this helped and you got your issue solved! This is probably related to this POI Bug which is related to Java Bug JDK-8013716: Renderer for Calibri and Cambria Fonts fails since update 45. In this case changing the Font or using JRE above 6u45 / 7u21 should fix the issue. You can also mtigitate the issue and avoid the columns from being totally collapsed by using a code like this: sheet.autoSizeColumn(x); if (sheet.getColumnWidth(x) == 0) { // autosize failed use MIN_WIDTH sheet.setColumnWidth(x, MIN_WIDTH); } I was also running into this issue and this was my solution. Steps: Create workbook Create spreadsheet Create row Create/Set font t...

Can Anyone Confirm That PhpMyAdmin AllowNoPassword Works With MySQL Databases?

Answer : Copy config.sample.inc.php to config.inc.php . In most cases you will find the config file on linux: /etc/phpmyadmin/config.inc.php on mac: /Library/WebServer/Documents/phpmyadmin/config.inc.php If you are trying to log in as root, you should have the following lines in your config: c f g [ ′ S e r v e r s ′ ] [ cfg['Servers'][ c f g [ ′ S er v er s ′ ] [ i]['user'] = 'root'; c f g [ ′ S e r v e r s ′ ] [ cfg['Servers'][ c f g [ ′ S er v er s ′ ] [ i]['AllowNoPassword'] = true; According to this: https://www.simplified.guide/phpmyadmin/enable-login-without-password This $cfg['Servers'][$i]['AllowNoPassword'] = TRUE; should be added twice in /etc/phpmyadmin/config.inc.php if (!empty($dbname)) { // other configuration options $cfg['Servers'][$i]['AllowNoPassword'] = TRUE; // it should be placed before the following line $i++; } // other configuration options $cf...

AH00161: Server Reached MaxRequestWorkers Setting, Consider Raising The MaxRequestWorkers Setting

Answer : Basically config got overwritten in: /etc/apache2/mods-available/mpm_prefork.conf I put the new setting in that file and it seems Apache works correctly now. Hopefully this helps someone else, don't put your config straight in apache2.conf or httpd.conf. Make sure you change all loaded config files. you should edit mpm_prefork <IfModule mpm_prefork_module> StartServers 10 MinSpareServers 10 MaxSpareServers 20 ServerLimit 2000 MaxRequestWorkers 1500 MaxConnectionsPerChild 10000 </IfModule> You modified the wrong file. Your log says "mpm_prefork" error. So you need to modify mpm_prefork.conf rather than mpm_worker.conf. You can also use "apachectl -M" to see what module you are using. e.g. My apache2 is using mpm_event_module, so i need to modify mpm_event.conf $ apache2ctl -M Loaded Modules: core_module (static) s...

Accessing Localhost (xampp) From Another Computer Over LAN Network - How To?

Image
Answer : Localhost is just a name given for the loopback, eg its like referring to yourself as "me" .. To view it from other computers, chances are you need only do http://192.168.1.56 or http://myPcsName if that doesnt work, there is a chance that there is a firewall running on your computer, or the httpd.conf is only listening on 127.0.0.1 Thanks for a detailed explanation. Just to Elaborate, in Windows, Go to Control Panel -> Firewall, in exceptions "add http and port 80". Then in Services check mark "http (web server port 80)" and "https (web server port 443)" ONLY if you need https to work also. Ok, OK, Close Then go to any computer on network and type http://computer-name (where you change the firewall and has the xampp running on it) in your web browser and happy days :) it's very easy Go to Your XAMPP Control panel Click on apache > config > Apache (httpd.conf) Search for Listen 80 and replace with Listen 8...

Client Denied By Server Configuration

Answer : In my case, I modified directory tag. From <Directory "D:/Devel/matysart/matysart_dev1"> Allow from all Order Deny,Allow </Directory> To <Directory "D:/Devel/matysart/matysart_dev1"> Require local </Directory> And it seriously worked. It's seems changed with Apache 2.4.2. For me the following worked which is copied from example in /etc/apache2/apache2.conf : <Directory /srv/www/default> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> Require all granted option is the solution for the first problem example in wiki.apache.org page dedicated for this issue for Apache version 2.4+. More details about Require option can be found on official apache page for mod_authz module and on this page too. Namely: Require all granted -> Access is allowed unconditionally. The error "client denied by server configuration" generally means that s...