Apache Web Server

19K

Solutions

14K

Contributors

The Apache HTTP Server is a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards. Typically Apache is run on a Unix-like operating system, but it is available for a wide variety of operating systems, including Linux, Novell NetWare, Mac OS-X and Windows. Released under the Apache License, Apache is open-source software.

Share tech news, updates, or what's on your mind.

Sign up to Post

I need to increase max_input_vars on an Apache 2.4, Amazon Linux with PHP 7.2 that is running php-fpm to 3000.  I changed php.ini restarted php-fpm and apache but there is no change.

Where do I make the change so that max_input_vars is changed?

Here is a screenshot of php info

https://gyazo.com/e1242115eabae9cc0b870bc7f9ab2ca3
0
Hello Htaccss  Experts :)

I have an htaccess file that has, near the end, a rewrite section that redirects the site to another url.

I don't want that redirect to happen, but I'm not sure how to change that htaccess file.

It's running on xampp that I installed on my local windows based server, for testing locally on Localhost.

I have changed the redirect to google, for privacy issues.   But I just want there to be NO redirect. It's a WordPress site that I just want to run locally for some testing. WordPress has been successfully installed.

Below is a snippet from the end of the .htaccess file   My snippet starts a few lines before the rewrite engine section -- and goes all the way to the end of the .htaccess file

ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 2 days"
</IfModule>
## EXPIRES CACHING ##

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^(.*)$ https://www.google.com/$1 [R,L]
# Use PHP70 as default
AddHandler application/x-httpd-php70 .php
# BEGIN custom php.ini PHP70
<IfModule mod_suphp.c>
    suPHP_ConfigPath /home3/zzz/public_html
</IfModule>
# END custom php.ini

Open in new window


Would just changing "rewriteengine" to öff do it?

As I said, I am running this on my local computer using xampp   (which I haven't used for a while, but I got localhost working on it.)

Thanks!
Rowby
0
The following .htaccess files is in the following directory and is working correctly:

C:\xampp\htdocs

AuthName "TickTockIT Int Protected"
AuthType Basic
AuthUserFile C:/xampp/apache/bin/passwordfile
# require valid-user
Require user admin
Order Deny,Allow
Deny from all
Allow from ::1
Satisfy Any

The above is only accessed by admin

I want to allow access to another sub directory to other specific users:
Directory: C:\xampp\htdocs\newsite\site
Access for users a and b
How do I do this - with a separate .htaccess file or a redirect from the .htaccess file above
If I use a separate .htaccess file how do I stop authentication being required by the parent .htaccess file (c:\xampp\htdocs) above?
Basically what is the best way to do this
0
Need expires headers to satisfy yslow on GMetrix.  I am on an Apache 2.4 Linux system.

When I use this code I get an 500 Internal Server Error

# Optimize cache-control
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault “access plus 1 month”
ExpiresByType image/gif “access plus 1 month”
ExpiresByType image/png “access plus 1 month”
ExpiresByType image/jpg “access plus 1 month”
ExpiresByType image/jpeg “access plus 1 month”
ExpiresByType text/html “access plus 3 days”
ExpiresByType text/xml “access plus 1 seconds”
ExpiresByType text/plain “access plus 1 seconds”
ExpiresByType application/xml “access plus 1 seconds”
ExpiresByType application/rss+xml “access plus 1 seconds”
ExpiresByType application/json “access plus 1 seconds”
ExpiresByType text/css “access plus 1 week”
ExpiresByType text/javascript “access plus 1 week”
ExpiresByType application/javascript “access plus 1 week”
ExpiresByType application/x-javascript “access plus 1 week”
ExpiresByType image/x-ico “access plus 1 year”
ExpiresByType image/x-icon “access plus 1 year”
ExpiresByType application/pdf “access plus 1 month”
<IfModule mod_headers.c>
Header unset ETag
Header unset Pragma
Header unset Last-Modified
Header append Cache-Control “public, no-transform, must-revalidate”
Header set Last-modified “Mon, 1 Oct 2018 10:10:10 GMT”
</IfModule>
</IfModule> 

Open in new window


my headers in htaccess looks like this

# BEGIN Really_Simple_SSL_UPGRADE_INSECURE_REQUESTS
<IfModule mod_headers.c>
Header always set Content-Security-Policy "upgrade-insecure-requests;"
</IfModule>
# END Really_Simple_SSL_UPGRADE_INSECURE_REQUESTS

Open in new window


The log says
[Sun Dec 23 12:59:33.053088 2018] [core:alert] [pid 7617:tid 140692416341760] [client 1.1.1.1] /data/web/abc.com/.htaccess: ExpiresDefault takes one argument, an expiry date code

Open in new window


Seems everything on the internet and the plugins are not suited for Apache 2.4.  Please help.

Thanks,
0
I need some mod rewrite help with a regex.  This is an example url - https://www.thefrugallife.com/12all/lt.php?c=1728&m=2981&nl=1&s=c9b91a7ca200a96e668e515ecf49b34c&lid=19221&l=-http--www.theherbsplace.com/Shop_A_Z_page_1_c_28.html

I am trying to get it to redirect to the url after the last equals sign - http--www.theherbsplace.com/Shop_A_Z_page_1_c_28.html

I have 2,000 links like this all with a different url after the last equals sign.

Here is my code

RewriteCond %{REQUEST_URI} /?12all/lt\.php$
RewriteCond %{QUERY_STRING} c=(.*)$ [NC]
RewriteCond %{QUERY_STRING} m=(.*)$ [NC]
RewriteCond %{QUERY_STRING} nl=(.*)$ [NC]
RewriteCond %{QUERY_STRING} s=(.*)$ [NC]
RewriteCond %{QUERY_STRING} lid=(.*)$ [NC]
RewriteCond %{QUERY_STRING} l=-http--(.*)$ [NC]
RewriteRule ^.*$ https://%6/? [NC,L,R=301]

Open in new window


Please tell me what I am doing wrong so I can get this cleaned up for Google.

Thanks,
0
Hi EE,

I have just installed xampp with the Apache and MySQL services installed.

When I am to reset the Mysql Server username/password but I go to phpmyadmin I am getting the following error message (see attached).

Attached are the config files for Apache and MySQL as well.

Any assistance is welcome.

Thank you.
Access-Denied.PNG
my.ini
httpd.conf.txt
config.inc.php.txt
0
Hi EE,

What's the reason behind the following error (see attached) I am getting mixed results when I google it, I am current the local admin on my PC and when I change port numbers in the .ini file (attached) xampp just tries to pick random ones.

Attached is the log file as well no clues I can see here.

Any assistance is welcome.


Thank you.
error.PNG
my.ini
mysql_error.log
0
Misconfiguration of certificate's CN and virtual name. The certificate CN has ww2.scryptions. We expected www2.scryptions.com as virtual name.
0
On http://dev.magickitchen.com/ I am making changes to the SSI files in order to validate.

So I remove or change a bit of code, then upload the SSI file. But I don't see the change right away.

I'll refresh the page, or try a different page, or even try adding ?54 after the address, but the change doesn't appear and the validator doesn't see it either.

But if I try again 3/4 hour later, just refresh the same page that's been up and look at source code, the change is there, and the validator sees it too.

Any thoughts on why there seems to be this SSI delay? It's Apache on red Hat Linux (RHEL6)

Thanks.
0
This is a follow-on to this question https://www.experts-exchange.com/questions/29120630/How-To-Enable-Rewrite-On-Linux-2.html - I followed the advice but forgot that wordpress will overwrite what is within the wordpress block so I am now moving it out of the block.

# END W3TC Page Cache core

RewriteCond %{QUERY_STRING} controller=product [NC]
RewriteCond %{QUERY_STRING} id_product=26 [NC]
RewriteRule ^/?index\.php$ /product/geranium-15-ml-100-pure-essential-oil/ [NC,R=301]

RewriteCond %{QUERY_STRING} controller=cms [NC]
RewriteCond %{QUERY_STRING} id_cms=([0-9]+)\%3F [NC]
RewriteRule ^/?index\.php$ /index.php?controller=cms&id_cms=%1 [NC,R=301]

RewriteCond %{QUERY_STRING} controller=product [NC]
RewriteCond %{QUERY_STRING} id_product=([0-9]+)\%3F [NC]
RewriteRule ^/?index\.php$ /index.php?controller=product&id_product=%1 [NC,R=301]

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

Open in new window


The first re-write rule produces this error:  

https://gyazo.com/9741f64223879ee3f42407f1985e4d5e

The other 2 rules work fine so why is this rule not working and producing this error?
0
Hi, we have a site, seniormealsolutions.com, which for reasons I won't go into doesn't yet have an SSL certificate.

if you go to the http version, you get the proper site.

If you go to the https:// version, you see our main site, magickitchen.com, but with the seniormealsolutions.com still in the address window. I am worried that this will show to Google as duplicate content, would it?

I've tried various ways to redirect https to http, in .htaccess, with no success so far. here's what I've tried:
RewriteEngine on
RewriteCond %{HTTPS} on
RewriteRule ^/?$ http://%{SERVER_NAME}/ [R=301]
RewriteRule ^inner/directory/?$ http://%{SERVER_NAME}/inner/directory/ [R=301,L]

Open in new window



RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} =https
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Open in new window


<VirtualHost *:443>
  SSLEnable

  RewriteEngine On
  RewriteCond %{HTTPS} on
  RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}

</VirtualHost>

Open in new window


RewriteEngine On
RewriteCond %{SERVER_PORT} 443
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Open in new window


RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Open in new window

0
Just installed WAMP on Windows 10. (There was no WAMP on my PC previously)

When I click the launch icon on my desktop, the command window opens for a few seconds and closes. The WAMP icon does not appear in the tray at the bottom right. (Although it did once, the first time, and it was Red).

I read somewhere (Google) that it could be a conflict with SkyPe also using Port 80. But my SkyPe is the latest version and Googling tells me that now you can't change (or see) the Port number on SkyPe!

What can I check please?

Thanks
0
Linux. I need to set up a script that I can run via cron in the middle of every night to copy / back up specific folders into another directory. I want all folders, files and permissions and attributes copied. The goal is to have a 24 hour old copy that I can restore in case a user screws up their files. Example:

/usr/home/thisuser/web_master would be copied / backed up to /usr/home/mainuser
/usr/home/thisotheruser/web_master would be copied / backed up to /usr/home/mainuser
/usr/home/andanotheruser/web_master would be copied / backed up to /usr/home/mainuser

Each night, the copy / back up would overwrite the one from 24 hours ago.

How do I set this script up, and what type of file extension should the script be?
0
I am encountering an error when I try to install memcached on a PHP 7 - Linux AWS system.  This is the command I am using that generates the error.
yum install memcached php-pecl-memcache

Open in new window


This is 1 of 2 errors:
1.
Finished Dependency Resolution
Error: Package: php-pecl-memcache-3.0.8-4.amzn2.x86_64 (amzn2-core)
           Requires: php(api) = 20100412-64

Open in new window


2.  
Error: Package: php-pecl-memcache-3.0.8-4.amzn2.x86_64 (amzn2-core)
           Requires: php(zend-abi) = 20100525-64

Open in new window


Please help me with how to finish installing memcached.

Thanks,
0
I want http://server.mydomain.org to take me straight to the java app.
What do I need to do to make that happen?

http://server.mydomain.org takes me to the Tomcat GUI.
http://server.mydomain.org/javaapp takes me to the java app.

i'm using this conf file.  It's the only site enabled.
<VirtualHost server.mydomain.org>
ServerName server.mydomain.org
ServerAlias server.mydomain.org
ProxyRequests off
ProxyPreserveHost on
ProxyPass / http://server.mydomain.org:8080/
ProxyPassReverse / http://server.mydomain.org:8080/
</VirtualHost>


The usual stuff. This is not enabled.
000-default
<VirtualHost *80>
#ServerName www.example.com  commented out.
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR]/error.log
CustomLog $[APACHE_LOG_DIR]/access.log combined
</VirtualHOst>

#vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Java 1.8.0
Tomcat 9.0.12
Apache 2.4
Debian 9.5

I have read doc's from Apache, and several from Digital Ocean, and others.
I just don't get it.
0
Hi, our site techgardens.com has been super slow, I had a whole other long question about that and it was decided that it was largely the hosting.

But we're still on the same host, and the boss has started to use pingdom to monitor the site. We keep getting site down reports, and mostly they are for the reason could not find redirect location.

Could anyone help me figure out where that error is coming from? Pingdom is not very informational.
0
I'm having a heck of a time getting SSL to work on an Ubuntu 18.04 server using Apache2. I've installed Mediawiki to /var/www/html/wiki. I have a mediawiki.conf file that has virtual host entries for both 80 and 443. I have SSLEngine on and for the certificate file and the key file I have them pointed to the correct directory.

I'm having two issues:

1. If i type https://domain.com/wiki, it gives me a 404 not found, yet it fills in the /index.php/Main_Page at the end of the URL but the port says 80
2. If i type https://domain.com/wiki/index.php/Main_page it works and it uses 443. The issue with that is, I'm getting an error with chrome that says I'm getting mixed content. When i go to developer tools in chrome it's telling me that the .png file im using for the logo is not secure.

I haven't messed with ubuntu and apache2 for a while so i'm probably missing something, im just not sure what.

Thank you.
0
how can I add signature (name in cursive) to apache open office writer for windows 10
0
Hi, I was wondering if someone could please help me figure out a way to change the template's theme name as shown below, on the urls in the head section of my site without actually renaming the folders/directories on the template itself.

If I were to rename the folders on the actual template structure, everything would break, and even if it didn't, the automatic theme updates would not work, and for that reason, I need to figure out a way to mask, or rewrite the urls without breaking the theme template.

I have been searching online for a way to do this on my server, but no luck so far. Please help.

<link href="/templates/template-name/css/theme.9.css?v=1537979830" rel="stylesheet" id="theme-style-css" />
      <link href="/templates/template-name/css/theme.update.css?v=1.15.7" rel="stylesheet" id="theme-style-update-css" />
      <script src="/media/jui/js/jquery.min.js"></script>
      <script src="/media/jui/js/jquery-noconflict.js"></script>
      <script src="media/system/js/copyright.js"></script>
      <script src="/templates/template-name/vendor/assets/uikit/dist/js/uikit.min.js?v=1.15.7"></script>
      <script src="/templates/template-name/vendor/assets/uikit/dist/js/uikit-icons-fjord.min.js?v=1.15.7"></script>
      <script src="/templates/template-name/js/theme.js?v=1.15.7"></script>

My server configuration is as follows:

Red Hat Enterprise Linux Server 7.5

Plesk Onyx Version 17.8.11

PHP 7.2.11

Apache and FPM Application served by Nginx
0
I installed Apache 2.4.37 Win64 VC15 and PHP 7.2.11 on Window 2016.  Microsoft Visual C++ 2015 Redistributable (X64).  Set up Apache, so when I go to locahost, it shows "It Works!".  However, after placing info.php with <?php phpinfo(); ?> and trying to open it, I have a blank page.

In httpd.conf, I added:
LoadModule php7_module "c:/php/php7apache2_4.dll"

<IfModule php7_module>
      AddHandler application/x-httpd-php .php
      AddType application/x-httpd-php .php .html
    PHPIniDir "c:/php"

</IfModule>

Also added to httpd.conf :

DirectoryIndex index.html index.php

In php.ini added:

extension_dir = "ext"

There C:\PHP\logs directory I created is empty.  Apache error.log shows this after each restart, but nothing else:

[Sun Oct 28 16:54:29.152004 2018] [mpm_winnt:notice] [pid 4288:tid 580] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Sun Oct 28 16:54:31.199280 2018] [mpm_winnt:notice] [pid 4156:tid 508] AH00364: Child: All worker threads have exited.
[Sun Oct 28 16:54:31.230224 2018] [mpm_winnt:notice] [pid 4288:tid 580] AH00430: Parent: Child process 4156 exited successfully.
[Sun Oct 28 16:54:34.120902 2018] [mpm_winnt:notice] [pid 2220:tid 580] AH00455: Apache/2.4.37 (Win64) PHP/7.2.11 configured -- resuming normal operations
[Sun Oct 28 16:54:34.120902 2018] [mpm_winnt:notice] [pid 2220:tid 580] AH00456: Apache Lounge VC15 Server built: Oct 18 2018 17:26:33
[Sun Oct 28 16:54:34.120902 2018] [core:notice] [pid …
0
if (isset($_POST['company'])) {
$sql = "SELECT frm_id, frm_companyname, frm_contact, frm_email, frm_rep, frm_date, frm_return, frm_timefrom, frm_timeto, frm_comment1, frm_comment2, frm_comment3, frm_comment4, frm_comment5, frm_todo1, frm_todo2, frm_todo3, frm_todo4, frm_todo5, frm_updated FROM siteform WHERE frm_companyname = '$search'";
$result = $conn->query($sql);
                
if ($result->num_rows > 0) {
    // output data of each row
    while($row = $result->fetch_assoc()) {
        echo '<div class = "divechoimages">'.'<a href="'. $link .$row["frm_id"].'">Create Individual PDF</a>'.$break.'<font color="blue">' . "id:" . '<font color="purple">' .$space.$row["frm_id"]. " - Company: " . $row["frm_companyname"]. $space."Contact: " . $row["frm_contact"]. $break." email: " . $row["frm_email"]. '<font color="red">'.$break." Rep: " . $row["frm_rep"]. '<font color="green">' .$break."Date Entered: " . $row["frm_date"]. '<font color="purple">' .$break."Return Date: " . $row["frm_return"]. $break."Time From: " . $row["frm_timefrom"]. $break."Time To: " . $row["frm_timeto"]. $break."Comment1: " . $row["frm_comment1"]. $break."Comment2: " . $row["frm_comment2"]. $break."Comment3: " . $row["frm_comment3"]. $break."Comment4: " . $row["frm_comment4"]. $break."Comment5: " . $row["frm_comment5"]. $break."ToDo1: " . $row["frm_todo1"]. $break."ToDo2: " . $row["frm_todo2"]. $break."ToDo3: " . $row["frm_todo3"]. $break."ToDo4: " . $row["frm_todo41"]. $break."ToDo5: " . 

Open in new window

0
I have updated a website that has been around for a while. I checked to see what the url looks like if I search for it on Google and it is www as opposed to not having www. I wanted to keep that but also force a redirect to https as the site was http. I have added a SSL certificate so it should be https.

I have done this in the root .htaccess file, bearing in mind this is a php MVC structured project (just mentioning in case that matters at all).

<IfModule mod_rewrite.c>
 RewriteEngine on
 RewriteCond %{HTTPS} off 
 RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
 RewriteRule ^$ public/ [L]
 RewriteRule (.*) public/$1 [L]
</IfModule>

Open in new window


So, this works fine if I click on the link from the google search results and if I type www.mysite.com directly into the browser url.

But, if I just type in mysite.com then it loads the site but doesn't force the www and some things on the site do not work anymore.

Console gives me a bunch of these errors:

has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource

So, firstly, what is the best way to fix this and secondly, am I not meant to choose a preferred version and somehow state that via a canonical tag or something along those lines. I am concerned google will think there is duplicate content if both www and non www sites work or is that not an issue?

Any advice would be appreciated.
0
On a new RHEL 7.5 server, I'm trying to get mod_fcgid to run on a simple perl script. I had previously been using mod_perl on an older server, with no issues.  I have confirmed that fcgi_module is installed and running. Server is Apache 2.4.6.

httpd.conf:
AddHandler fcgid-script .fcgi

hello.fcgi:
#!/usr/bin/perl
print "Content-Type: text/html\n\n";
print "hello world";

Error log:
[Fri Oct 12 17:33:50.655808 2018] [fcgid:warn] [pid 13551] (104)Connection reset by peer: [client xxx.xxx.xxx.xxx:xxxxxxx] mod_fcgid: error reading data from FastCGI server
[Fri Oct 12 17:33:50.655891 2018] [core:error] [pid 13551] [client xxx.xxx.xxx.xxx:xxxxxx] End of script output before headers: hello.fcgi
0
301 page redirect

I am wanting to re direct

www.xxxxx(whatever)/sales to
www.xxxx(whatever)/mytown/sales

Foe SEO benefits.

I have an apache server
What would be the 301 redirect code and where on my server would it go?

ie where to upload it to?
0
Dear Experts

We are running web server (10.253.18.41) which is on lamp stack and database server mysql is on another server 10.253.12.42, users are complaining the application is taking too long time also on prospect conversion takes too much time and finally timeout approx 3 mins then time out , when check the network statics below is the continuous report, please let me know what does this indicate, what could be the solution

tcp        0      0 10.253.18.41:38760          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38765          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38274          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38130          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38590          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38116          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:39296          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38577          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38379          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:39027          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38827          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38222          10.253.12.42:3306           TIME_WAIT
tcp        0     …
0

Apache Web Server

19K

Solutions

14K

Contributors

The Apache HTTP Server is a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards. Typically Apache is run on a Unix-like operating system, but it is available for a wide variety of operating systems, including Linux, Novell NetWare, Mac OS-X and Windows. Released under the Apache License, Apache is open-source software.