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 upgrade fail2ban 0.8.14 to 0.10.3.  I am on a Linux 2 server which prevents me from loading any repositories or using Yum to install it.

So, I need to know the steps to get my fail2ban upgraded.  

Thanks,
0
I am using WAMPSERVER 3.1.0 which incorporates Apache. I followed this tutorial to create an ssl certificate and use https on my site. I purchased a Godaddy certificate and it works with https://localhost but does not work with https://mydomain.com. It's like it cannot find it, however http://mydomain.com does work.

Any help would be apprecaited!
0
Insert php page:
<?php require_once('incMultiDBConnection.php'); ?>
<?php 


$insert = $db->prepare("INSERT INTO inventasequipment (equip_companyname, equip_name, equip_type, equip_sn, equip_productno, equip_website, equip_support, equip_use, equip_purchasedate, equip_warrenty, equip_performance, equip_comments, equip_cost, equip_datevisited, equip_timefrom, equip_timeto) VALUES (:company, :name, :type, :sn, :pn, :web, :support, :use, :purchase, :warrenty, :perf, :comments, :cost, :visitdate, :timefrom, :timeto)");

foreach ($_POST['equip'] as $equipment):
    $insert->execute([
        'company' => $equipment['companyname'],
        'name' => $equipment['equipname'],
        'type' => $equipment['equiptype'],
        'sn' => $equipment['equipsn'],
        'pn' => $equipment['equippn'],
        'web' => $equipment['equipweb'],
        'support' => $equipment['equipsupport'],
        'use' => $equipment['equipuse'],
        'purchase' => $equipment['equippurchase'],
        'warrenty' => $equipment['equipwarrenty'],
        'perf' => $equipment['equipperf'],
        'comments' => $equipment['equipcomments'],
        'cost' => $equipment['equipcost'],
        'visitdate' => $equipment['equipvisit'],
        'timefrom' => $equipment['equiptimefrom'],
        'timeto' => $equipment['equiptimeto'],
    ]);
endforeach;



?>

Open in new window


The above code works in that the first set of data is passed to the database correctly but the second set is only passed to the database with the first character of the text string from each text input box from the input form:

Input form:

Open in new window

0
apache tomcat 8.5.33 doesn't start up when I double click the startup.bat file from the bin directory.The window opens and closes immediately.
Please help.
0
I have an Ubuntu server running Apache2 for my website.  I need to create a dev copy of the site so my web developer can make changes and test.  So far this is what I did.

  1. Cloned the VM server
  2. Changed the IP
  3. Created a new DNS record for the server (dev.contoso.com)
  4. The original url was www.contoso.com and I want to create a new Virtual Host.
  5. Copied both the contoso.com.conf in the Sites-Enabled and Sites-Available directory with the name dev.contoso.com.conf
  6. Restarted the Apache2 service successfully

With all this completed I entered the URL dev.contoso.com in both IE and Chrome and the address is rewritten to https://www.dev.contoso.com 
I looked at the dev.contoso.com.conf and all ReWrites are remarked out.

<VIRTUALHOST *:80>
        ServerName flhlaw.com
        ServerAlias www.flhlaw.com
        Redirect / http://dev.contoso.com
        ServerName contoso.com
        ServerAlias dev.contoso.com
        Redirect /secure  https://dev.contoso.com
</VIRTUALHOST>
<VIRTUALHOST *:443>
    ServerAdmin webmaster@localhost
    ServerName dev.contoso.com
    ServerAlias dev.contoso.com
    DocumentRoot /var/www/www.contoso.com/web
   SSLEngine on
   SSLCertificateFile /etc/apache2/cert/contoso.crt
   SSLCertificateKeyFile /etc/apache2/cert/contoso.key
   SSLCertificateChainFile /etc/apache2/cert/gd_bundle-g2-g1.crt
    <DIRECTORY />
        Options FollowSymLinks
        

Open in new window

0
Hi all

I've been asked to add the following nginx ? code to my server but I'm running a windows version of Apache so this will not work. I assume this maps to a simple rewrite some how but can anyone let me know the code to use please?

I've been asked to add

location /install {
    try_files $uri $uri/ /install/index.php;
}

Open in new window



This is my current .htaccess file so I guess I need to add it here somehow?

RewriteEngine On
Options +FollowSymLinks
Options -Indexes
RewriteCond %{SCRIPT_FILENAME} !-d  
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule . index.php [L,QSA]

Open in new window

0
I am using XAAMP in windows 10. I am getting errors on all Php_mysqli functions not recognized. Call to undefined function mysqli_connect(). It appears the DLL is not loading. I changed and activated the extension= php_mysqli.dll in PHP ini file several times and taken the “;” off. Can you give me some suggestions? Should I use LAMP or WAMP?
0
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

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.