Apache Web Server

19K

Solutions

15K

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

How do i validate the level of apache struts on the Linux server?
0
My system crashed and I need to find out what caused the crash.  I have atop installed and I can see what process caused the problem by using the log files with atop.  However, I want to know what programs and files were involved in the process.

Is there a way to do this with atop and/or sar?

I am on a Linux 2 AWS instance.
0
If i type in the web address as https://somewebsite.com it works perfectly. If I type in https://www.somewebsite.com it breaks. How can I force it to always go to one url only, no matter how the user types it in the address bar?

I have this in my .htaccess file

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

Open in new window

0
I recently cleaned my server off, and installed a fresh copy of centos 7 linuxs on it. My issue is i have ssh running, but i am only able to access it with my private ips. I am not clear on how to set it up to use my static ip and domain names? Please help? The domains are not setup yet, since i just installed centos 7 again. i need help with the basic understand of setting my ssh up to allow remote access in another city.  when i try to use my static ip to access it i get this error "port 22: No route to host ". My firewall is complete down, so there or not blocks, so it has to be a configuration issue. i Just dont know what to do to fix it.
0
Before I post my question, please be aware that I am not very familiar with this stuff so please be gentle with me!

I have my store website hosted on Debian OS 8.11 with Plesk Onyx 17.8.11. I got a warning from Jetpack this morning that my website was down so I tried to load it and got a 502 bad gateway error.

When I logged into Plesk, I see this message:

"New configuration files for the Apache web server were not created due to the errors in configuration templates: Can not restart web server: . Detailed error descriptions were sent to you by email. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files. See the details in Configuration Troubleshooter"

I try generating new configuration files but no success. I then get this email in my inbox.

Template_Exception: Can not restart web server:
file: /opt/psa/admin/plib/Service/Driver/Web/Server/Apache.php
line: 109
code: 0

I am not sure what to do next..Please help!

Thanks in advance.
0
I noticed most web site hosts offer a 'cpanel' to the website owners/customers, which seems to be different to the CMS for editing pages. As a novice in this area, what exactly does the cpanel allow the website owner to do? Or put another way, we want assurance only the correct people have access to the cpanel for our website, so to quantify the risk, what could a malicious or unqualified person do to our site if they had access to the cpanel.
0
I have the following code:

RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteRule ^xyz  xyz.php [PT]    
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Open in new window


First redirect redirects www.example.com/xyz to www.example.com/xyz.php.

This works fine.

Second one has a problem. If I type in example.com, it creates an infinite loop to:

https://example.com/example.com/example.com

If I type in www.example.com, it also creates an infinite loop similar to the above.

I want to redirect everything from:

http://example.com/... https://example.com/... to https://www.example.com/...

What am I missing here?
0
Hello Experts,

I have www.mysite.com and ww2.mysite.com

Is there a way to alias/redirect www.mysite.com/portal to ww2.mysite.com/portal and mask ww2 with www?

CentOS 7/ Apache2
0
Hello,
I install apache on ubuntu Linux 18.4 with mod security + mod Proxy
form example I have domain name test.com  that is point to above server
I want when I request test.com to be going to for example to other server for example i9 1.1.1.1 that is on internet.
in short I want to creat somting like a cloudflare
could you please give me the correct configuration ?
please note that the client should not knowing the 1.1.1.1 server.
thanks.
0
Whenever I make javascript changes people have to clear their cache etc. for the changes to properly take effect (most times for some people) . Is there a way I can perform a refresh on the web hosts side as I obviously can't email everyone telling them they need to clear their cache whenever I make a critical change.
0
I am trying to force https with my .htaccess file but when I do, the layout breaks and I get 404 errors in console for pretty much everything from css files to js files etc. I am using a MVC structure.

In my config file I have:

define('URLROOT', 'https://mysite.com');

Open in new window


In my header all my css files are called like this:

<link href="<?php echo URLROOT; ?>/css/style.css" rel="stylesheet">

Open in new window


My .htaccess looks like:

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

Open in new window

0
I am trying to reverse engineer someone else's Apache web server configuration setup.      

There are two RHEL 6 servers running 2.2 Apache web services.   Apache is being used to front-end a JAVA tomcat application.
On one server, the Apache log files are owned by the tomcat user.  
On the second server, the logs are owned by root.    

By corporate standards, the designated Apache log directory only allows 2 GB worth of data.   We exceed that on a regular basis and must route the logs to a subdirectory of the application and allow that application's log maintenance system to periodically archive the files.   However, the root owned log file permissions do not allow the tomcat user to perform cleanup maintenance.   Making the tomcat user the log owner resolves that problem.

ps aux show that both servers run apache using the apache user.    


I've looked in httpd.conf (and secondary files included by it)  and logrotate.d and cannot find a config file entry which explains the difference in log owner.   Can someone point me to a likely suspect?   The tomcat application's documentation does not address this problem.

Thank you.
0
We are attempting to install an SSL certificate on a website which already has a sub-domain attached to it. So this is the picture:

The website has been installed on product.domain.com and we have an SSL certificate already installed on that domain URL. The Wordpress site is set to force SSL and it works fine. No problem. If someone types in https://product.domain.com the site comes up fine - all good. If someone types product.domain.com the site comes up perfectly with https://product.domain.com.

If someone types www.product.domain.com without the http or https,  the site works fine - it strips the www and reverts to https://product.domain.com so this is all OK.

However, if someone actually types the full thing - as https://www.product.domain.com the site does not strip the https:// or the www so the browser displays a security exception as if the site was not covered by an SSL certificate.

I've tried various configurations in the .htaccess file but nothing I do seems to work.

Any help with this sincerely appreciated.

Cheers
Chris
0
I have a new installation of woo commerce and I have noticed the urls are inconsistent regarding my products on the site.  Some urls are showing the product id and others aren't.  My preference is to not show the id.

https://www.theherbsplace.com/product/sf_p_1458/[code] - With id

[code]https://www.theherbsplace.com/product/neroli-organic-5-ml-100-pure-essential-oil/

Open in new window

- Without id

It seems when the id is in the url it goes to a category page first rather than the single product page.

I have tried changing the perma-links to something else then saving them.  Then immediately putting them back to their original setting and save again but there was no change.

Please show me how to get the product url's consistent with no id on them.
0
I am trying to access an rss feed (https://www.thedailymash.co.uk/rss.xml) using file_get_contents() but it keeps returning false with the error

Unable to find the socket transport &quot;ssl&quot;

I have openssl enabled because in php.ini I have uncommented the line
extension=openssl

From phpinfo
Apache Version      Apache/2.4.25 (Win32) PHP/7.2.8 OpenSSL/1.0.2k
SERVER_SOFTWARE      Apache/2.4.25 (Win32) PHP/7.2.8 OpenSSL/1.0.2k


On a machine running an apache server with php, not wamp or xampp or damp or mamp or camp, just apache, php and mysql.
0
I am trying to trace down a segfault error using SAR on a Linux 2 Apache Amazon instance.  I have SAR installed and can see when the memory spikes but how can I find out in the log files what process is causing the memory spike?

Here is what I am seeing using SAR

https://gyazo.com/890b4ab5214fa269a14f3adeec175116

I just need to know what process is causing the memory to increase.  Normally memory usage is in the 40% area.

Thanks,
0
I want to install Fail2Ban on an Apache 2.4 Linux 2 machine.  As a Linux 2 user I can't download the epel repository according to Amazon engineers.

Consequently, I used wget and now have fail2ban-0.8.14 directory in my /etc folder.  I need to install fail2ban but the normal install commands aren't working.  I tried apt-get and it isn't on my server.  So how do I install fail2ban?

Thanks,
0
I have a script that reads the access_log files and counts how many times an ip has accessed the site.  This works great and helps me to find bots I want to remove.  My question is, how do I get the access files and error log files to look the same?

I use a vhosts.conf file and in one of the virtual directories we have the following:

<VirtualHost 172.31.8.214:80>
        ServerName www.theherbsplace.com
        ServerAlias theherbsplace.com
        DocumentRoot /data/web/theherbsplace.com

        ErrorLog /data/log/php_errors_thp.log
        CustomLog /data/log/access_thp.log combined

        RewriteEngine On

<Directory /data/web/theherbsplace.com/>
     Require all granted
  </Directory>
</VirtualHost>

Open in new window


When I add the word combined to the error log format line I get the following error:

AH00526: Syntax error on line 7 of /etc/httpd/conf.d/vhosts.conf:
ErrorLog takes one argument, The filename of the error log

Open in new window


The format of the access_log is the one I want the errors log to follow.

So, how can I get the log format the same on both?  This is because it gives me the information I need and also will permit the script to read the error logs too.

Thanks,
0
I am on an Amazon Linux 2 AMI running Apache 2 and I need a software solution for security.  I have been told mod_security isn't a good choice.  So does anyone have experience with the AWS Waf?  If so, what rules are you using?

Or, do you have another idea altogether?

On my previous instance I used fail2ban but I found the bots could outsmart fail2ban so hopefully someone will have a better choice.

Let me clarify my biggest  problems are postfix issues, stopping ddos, bots running up and down my site stealing bandwidth, clicking on every link and having numerous disk i/o's which I have to pay for.

By the way, I am not interested in using another AMI due to the complexity of my existing AMI.
0
I have installed apache tomcat 7.0.90 on my windows 8 64bit system. This is how I have configured my tomcat-users.xml -

<?xml version='1.0' encoding='utf-8'?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<tomcat-users>
<!--
  NOTE:  By default, no user is included in the "manager-gui" role required
  to operate the "/manager/html" web application.  If you wish to use this app,
  you must define such a user - the username and password are arbitrary. It is
  strongly recommended that you do NOT use one of the users in the commented out
  section below since they are intended for use with the examples web
  application.
-->
<!--
  NOTE:  The sample user and role entries below are intended for use with the
  examples web application. They 

Open in new window

0
I need to upload a Wordpress theme and I am getting the message that I am exceeding the max_filesize.  I have change php.in, restarted Apache and still I get the same error.

These are the settings I have changed:

upload_max_filesize=122M
post_max_size=168M
memory_limit=512M
file_uploads = On
max_execution_time=290

Open in new window


Please tell me what to fix.

Thanks,

Randal
0
Hello,
I have wamp version  3.1.3  i have multiple website and everything work fine ....
i want to enable lets encrypt certificate on on of website:
i do the following steps:
on httpd:
oadModule ssl_module modules/mod_ssl.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
on vhsot file:
<VirtualHost *:80>
 ServerName mydomain.com
 ServerAlias www.mydomain.com
 DocumentRoot "c:/mywebsites/www.mydomain.com"
 <Directory  "c:/mywebsites/www.mydomain.com/">
  Options Indexes FollowSymLinks
        AllowOverride all
        Order Deny,Allow
        Allow from all
        Require all granted
 </Directory>
 ErrorLog "logs/mydomain.com-error.log"
 CustomLog "logs/mydomain.com-access.log" common
 Alias /.well-known c:/mywebsites/www.mydomain.com/.well-known
</VirtualHost>
and download the last package of  letsencrypt-win-simple
the run the letsencyprt file as admin
press m the 1 then mydomain.com then  4  then 1
its give me validation plugin not found or not created
create certificate failed
i try to brows http://mydomain.com/.well-known
its give me:The requested URL /.well-known was not found on this server.
so where is the problem ?
is there any other way to get i certificate ?
thanks.
0
hi,

I want to use imagemagick on the cloud, i have a Bluehost account that says it's available https://my.bluehost.com/hosting/help/imagemagick

I have very limited experience in unix (or whatever the operating system is?) and I'm unable even to find out how to get to a command line to test this.

This question is just to get me kicked in the right direction, so any of the following would be a good start:
1. getting onto a command line and verifying the statements form the link above
2. creating a simple script file that i can run on the server somehow
3. a dummies summary of how imagemagick could work on bluehost

Attached screenshot of some of the bluehost advanced options.

Thanks

Related question resolved:
https://www.experts-exchange.com/questions/29103444/Using-a-google-script-to-process-a-jpeg-image.html
0
Hi,

I would like to request an assistant.

I would like to make a redirect using .htaccess .

The condition that i would like to combined are as follows :

1. redirect any access from /supporttickets.php to https://support.domain.com

2. redirect any access from  /submitticket.php to  https://support.domain.com/Tickets/Submit

3. redirect any access from   /contact.php to https://www.domain.com/contact.php

4. redirect any access to "billing" folder to https://billing.domain.com

5. IGNORE all above rules if the access file are "fpx_indirectcallback.php" or "fpx_directcallback.php"


Appreciates anybody assistant on this issue.
0
I have a curl error 77
Update Failed: Download failed. cURL error 77: error setting certificate verify locations: CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none

Open in new window

whenever I try to update my plugins in wordpress.

The site is www.thefrugallife.com

I have an Apache 2.4 instance running Linux 2 from Amazon.

I have recently moved the site and switched it to https.  My site certificate is showing it gets a B on SSL Labs using ipv4.

I can't update anything on the site till this error goes away.  Please let me know how to get rid of that error.

Thanks,
0

Apache Web Server

19K

Solutions

15K

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.