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

Running the following CURL command:
curl https://tlstest.paypal.com

Open in new window


I am faced with an error to do with the  SSL certificate:

curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). The default
 bundle is named curl-ca-bundle.crt; you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
[#### ~]$ curl --tlsv1.2 https://tlstest.paypal.com/
curl: option --tlsv1.2: is unknown
curl: try 'curl --help' for more information
[#### ~]$ curl --tlsv1 https://tlstest.paypal.com/
curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA)
0
hi
I'm getting the following error on my bluehost server when i use a certain script.

Not Acceptable! An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.

I think it has something to do with the .htaccess file, if so how can I edit it to remove this issue ?

Here is my htaccess file from the public_html folder (some URLs replaced with 'mydomain'):

RewriteEngine on
# Use PHP5.6 as default
# AddHandler application/x-httpd-php56 .php
RewriteCond %{HTTP_HOST} ^mydomain\.net$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mydomain\.net$
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^/?$ "http\:\/\/www\mydomain\.com\/" [R=302,L]


# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php56” package as the default “PHP” programming language.
<IfModule mime_module>
  AddType application/x-httpd-ea-php56 .php .php5 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

Open in new window


Thanks a lot
0
I need to redirect most links of my website, including the home page, to a domain with a different domain prefix. But I need to NOT redirect all links that include a specific directory following the domain in the URL. Here's what it looks like:

All links from "admin.domain.com" must redirect to "www.domain.com" EXCEPT for all links that begin with "admin.domain.com/administrator".

What is the htaccess code that will do this, assuming it can be done?

Thanks!

Regards,
Jonathan
0
I just stood up a new Apache server on a Ubuntu 14.04 VM.   My consultant requested this.   I am trying to get SSL to work and I'm stuck.   the site works if I access over http:// however   Every time I access the URL with https:// I'm getting

This site can’t provide a secure connection
authorize.mpbio.com sent an invalid response.
Try running Network Diagnostics.
ERR_SSL_PROTOCOL_ERROR

Here is the .conf file.   I'm lost on figuring out why it's not working.  

Any help is greatly appreciated.  I'm sure the solution is something simple.

Thanks in advance.  

<VirtualHost *:80>
        ServerName mysite.com
        ServerAlias server.mysite.com
        ServerAlias dev-app-2
        DocumentRoot /var/www/vhosts/xxxxx
        <Directory /var/www/vhosts/xxxxx>
                Options -Indexes +FollowSymLinks -MultiViews
                AllowOverride All
                #Order deny,allow
                #Allow from all
                Require all granted
        </Directory>
        CustomLog /var/log/apache2/xxxxx.log combined
        ErrorLog /var/log/apache2/xxxxx-error.log
        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn
</VirtualHost>
<VirtualHost *:443>
        ServerName mysite.com
        ServerAlias server.mysite.com
        ServerAlias dev-app-2
        DocumentRoot /var/www/vhosts/xxxxx
        SSLProtocol all -SSLv2 -SSLv3
        SSLEngine on
        …
0
My web host is upgrading something so I have to redirect all my current Miva cart pages to new ShopSite URL's. I am trying to do that in my .htaccess file but the names of many of my products share similarities, as shown by the two examples below. What I have below always pulls up the first item in addition to pulling up the second item when I test the second redirect. How can I fix this?

RewriteCond %{QUERY_STRING} ^(.*)Product_Code=A363(.*)$ [NC]
RewriteRule .? https://shop.mysite.com/cgi-bin/sc/order.cgi?storeid=*14c90e&dbname=products&guid=da713abc-0c58-11e8-9836-002590155d56&function=add [QSD,L,R=301]

RewriteCond %{QUERY_STRING} ^(.*)Product_Code=A363DT(.*)$ [NC]
RewriteRule .? https://shop.mysite.com/cgi-bin/sc/order.cgi?storeid=*14c90&dbname=products&guid=da713abc-0c58-11e8-9836-002590155d56&function=add [QSD,L,R=301]

Open in new window

0
To completely prevent caching (storing it and using it), usually on the internet they are saying you have to use something like this in your .htaccess file:

<ifModule mod_headers.c>
     Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
     Header set Pragma "no-cache"
     Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</ifModule>

Open in new window


I see this everywhere, but I don't understand it. What's the difference between the code above and this:

<ifModule mod_headers.c>
     Header set Cache-Control "no-cache, no-store"
     Header set Pragma "no-cache"
</ifModule>

Open in new window


In my opinion you could use the last one. There is already "no-cache", so there will be anyway (re)validation. So "max-age=0", "must-revalidate", and "Expires" makes no sense to me?

So for what reason exactly people are adding those things to the .htaccess file?
0
I have a computer with Ubuntu installed and setup with Apache .  I have a domain name, and have pointed it to the IP address of the PC, which works, but I want it to go to a specific folder on the web server not the general folder, how can I do this.

Www.mydomain.com goes to 127.0.0.1 but I want it to go to 127.0.0.1/folder

My external IP address is obviously not 127.0.0.1.

Thanks
0
I am using sms panel to send OTP
but when I run my page in localhost
it show like this

Fatal error: Call to undefined function curl_init() in

and
i also  remove comment from ini file
extension=php_curl.dll

but still it showing this fetal error
0
I am using Oracle 9i database and PHP(5.6.33) for an application.
Application is showing PHP extension issue "None of the supported PHP extensions (OCI8, PDO_OCI) are available".
But i have tried to download couple of php extension named as OCI8.dll and PDO_OCI.dll to my PHP configuration file, but
still error is not going.Please help me on so I can connect oracle database with PHP.
0
I am trying to configure an ubuntu (14.04 LTS) linux server with apparmor to protect the Apache2 web server, but I can't find any best practice or how-to guides for this specific purpose, only some basic guides for apparmor with the default profiles which do not include apache2 configuration. The ubuntu web server is running Apache2, Drupal 7, and MySQL. Is there a basic template for the AppArmor-Apache2 config that I should be implementing for basic security or is this something that has to be specific to the site?
0
I have an AWS EC2 instance running Amazon Linux running Wordpress MultiSite. I'd like the sites in the Network to be able to resolve to HTTPS.

What's the best way to install multiple SSL's on a single Wordpress Server? Is is possible to list multiple SSL's in the ssl.conf file?

Thanks for your help.
0
I need to have IIS on one server and Apache Tomcat on a separate server.   Can this happen?  I have seen many pieces of how to set them up on the same server.  I need to have the IIS server send requests to the Tomcat server and then have IIS serve the requests up from Tomcat.  How would one set this up?
0
Hi,

We have an Apache webserver running Perl + Template Toolkit and a MySQL database for user access on a VM running Windows 2012 R2.

We have recently made some tweaks to the Perl code, nothing big, just a few edits and extra templates and some design changes (CSS etc). this was tested for several months on an identical dev server and we didn't see any issues.

We went live with the changes and everything was fine for about a week but now we are seeing an odd issue where the site hangs when navigating between pages then works fine for a bit and then hangs again. No pattern to this at all. Sometimes its fine for a few minutes, other times its seconds before it hangs again.

CPU usage is about 15%, Ram is at 80% but always as been as we only have 2GB on here. Neither of them peak or change when the browser hangs.

The issue we are seeing is if we browse the website using the local IP then we see this issue.

If we browse the site using localhost in the same browser (different tab) we never see this issue.

So we can be sat with the site hanging on the IP tab but still able to browse about in the other tab on localhost.

Our db is tiny (only about 200 users, the site isn't hugely busy and nothing else has changed.

Before we go rolling the system back, should we be looking anywhere in particular that could cause this disparity between browsing using the local IP and localhost?

We've:

Reset the IP stack, reinstalled VMtool drivers and reset up the …
0
After a security review of our new WordPress site it was pointed out that we're vulnerable to "External Service Redirecton - DNS". Specifically, if a URL is entered into the "Your Name" field of our Contact 7 Form then the testers have found that: "It was possible to induce the application to perform server-side DNS lookups of arbitrary domain names"

The suggested remedial action is to implement a whitelist of permitted services and hosts and to block interaction not on this whitelist.

I'm something of a newbie when it comes to this, and it occured to me (perhaps wrongly!) that there may be different whitelists; one for those who cannot enter the site, and a separate for sites to which our server is allowed to speak. Or does a whitelist imply both ways?

Anyway, all help on this gratefully received and I'm imagining this is something that's been done a zillion times before!

I'm using IIS and would prefer that answer, although Apache related help just as good because I've realised I can kind of 'translate' how to do it once I've got the idea.

Incidentally, we definitely want to avoid editing the Contact 7 form's code too much becasue this may be lost when we upgrade, even though I dare say this would fix the issue. Unfortunately the latest version has the same problem, although will let the Contact 7 team know to look into this. Would ideally like to use another form for data collection of this sort although i'm a part of a team that prevents this!

And so, in …
0
after I ran below, my owncloud become like this, any idea how to fix it ?

semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/owncloud/data'
restorecon '/var/www/html/owncloud/data'
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/owncloud/config'
restorecon '/var/www/html/owncloud/config'
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/owncloud/apps'
restorecon '/var/www/html/owncloud/apps'

setsebool -P httpd_unified 1
setsebool -P httpd_execmem 1


123
0
BACKGROUND:
A ways back, I'd set up nameservers on my VPS (let's call them 'ns1.mydomain.com' and 'ns2.mydomain.com').  I host a couple of dozens websites on that VPS.

For all of my domains, on the domain registrar's site, I'd set the Nameservers for that domain to Custom Nameservers:  'ns1.mydomain.com' and 'ns2.mydomain.com'.

Recently, I had to ask my VPS provider to create a new server for me (let's call it 'newVPS'), leaving my previous VPS (let's call it 'oldVPS') active so I could migrate or re-create accounts and contents from the oldVPS to the newVPS.

Both the oldVPS and newVPS use WHM/CPanel admin interfaces.  
The oldVPS is setup as (cut and pasted from the WHM panel banner): 'CENTOS 6.9 i686 virtuozzo – oldvps  WHM 56.0 (build 52)'
The newVPS is setup as (cut and pasted from the WHM panel banner): 'CENTOS 7.4 virtuozzo [newvps]  v68.0.21'

My understanding (which is limited in these areas) is that the nameservers I setup on my VPS have to be associated with one of the domains I own/host on that VPS.

The nameservers which I had previously setup on oldVPS were associated with 'mydomain.com' one of the domains/accounts hosted on oldVPS.  

For simplicity, I'm thinking of creating new nameservers on newVPS and associate them with 'myotherdomain.com', another domain/account to be hosted on newVPS.

QUESTION:
How do I create my new nameservers on newVPS, say 'ns1.myotherdomain.com' and 'ns2.myotherdomain.com', presumably from newVPS's WHM (I'm …
0
I have two servers right now that are set up on my local network.

I know using Apache on Ubuntu that I edit the /etc/hosts file to create hosts (i.e. phppatternsobjectsandpractice.local) - set it to 127.0.0.1, and I can visit it on my local computer.

I want to host intranet site on one of my servers, and allow people who are connected to my network to type in a site (phppatternsobjectsandpractice.localhost) and visit the site.

Do I edit the /etc/hosts file or do I set up Bind on my two servers?

Thanks
0
I am trying to help a friend and after editing a few files the site is getting an error 500
attached are a few files from the web site
If I type the domain/index-static.html it loads but no links are working

the domain is http://datlasestates.com/

I am not sure what needs to do any guidance would be appreciated

I know the site is hosted on amazon server could this be from their side or could it be a scripting error?


here is the .htaccess file

GeoIPEnable on
SetEnvIf GEOIP_COUNTRY_CODE US AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE CA AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE RS AllowCountry
# SetEnvIf GEOIP_COUNTRY_CODE UA AllowCountry
# SetEnvIf GEOIP_COUNTRY_CODE RU AllowCountry

Deny from all
Allow from env=AllowCountry


RewriteEngine on

#Redirect 301 /index.html /index.php
Redirect 301 /about.html /about.php
Redirect 301 /faq.html /faq.php
Redirect 301 /recently_purchased.html /recently-purchased.php
Redirect 301 /contact.html /contact.php
Redirect 301 /sell.html /sell.php
Redirect 301 /blog.datlas.html /blog.datlas.php
Redirect 301 /philadelphia.html /philadelphia.php
Redirect 301 /pennsylvania.html /pennsylvania.php
Redirect 301 /victorian_jewelry.html /victorian-jewelry.php
Redirect 301 /art-nouveau-beauty-of-nature.html /art-nouveau-beauty-of-nature.php
Redirect 301 /edwardian-style-hail-to-the-king.html /edwardian-style-hail-to-the-king.php
Redirect 301 /faberge-a-life-of-its-own.html /faberge-a-life-of-its-own.php
index-static.html
index.php
0
Hello experts
Today i let my desktop install the latest updates and after that the apache server does not start.
I read about the port issues with skype and i uninstalled the app but the problem remains.
Any help to solve my problem?

software information:
Windows 10
Apache 2.4
error code 1

Thank you
0
Is there a way for me to change the path to my httpd.conf file besides starting the server with the -f?

Thanks,
David
0
Hello everyone!.

I am trying to configure my apache server so only some locations have authentication. Currently I have this:

<VirtualHost *:443>
    Header set Access-Control-Allow-Origin "*"
    ServerName mydomain
    DocumentRoot /var/www/ws
    <Directory /var/www/ws/>
        AllowOverride All
        Allow from all
        Options all
        Require all granted
    </Directory>
    <Location "/">
        AuthType Basic
        require valid-user
        AuthUserFile /var/www/.htpasswd
        AuthName "Authorization Required"
        satisfy any
        deny from all
        allow from 192.168.10
        allow from 172.16.10
    </Location>
    SSLEngine on
    SSLCertificateFile /etc/ssl/certs/apache.crt
    SSLCertificateKeyFile /etc/ssl/certs/apache.key
    SSLCertificateChainFile /etc/ssl/certs/apache.crt
    LogLevel debug
    ErrorLog /var/www/ws/logs/error.log
    TransferLog /var/www/ws/logs/access.log
    php_value include_path .:/usr/share/pear:/var/www/ws
    Alias /ws /var/www/ws
</VirtualHost>

Open in new window


However every locations  needs authentication. I want something like this:

<VirtualHost *:443>
    Header set Access-Control-Allow-Origin "*"
    ServerName mydomain
    DocumentRoot /var/www/ws
    <Directory /var/www/ws/>
        AllowOverride All
        Allow from all
        Options all
        Require all granted
    </Directory>
    <Location "/">
        AuthType Basic
        require valid-user
        AuthUserFile /var/www/.htpasswd
        AuthName "Authorization Required"
        satisfy any
        deny from all
        allow from 192.168.10
        allow from 172.16.10
    </Location>
    <Location "/services/location1/*">
        satisfy any
        Allow From All
    </Location>
    <Location "/services/location2/*">
        satisfy any
        Allow From All
    </Location>
    SSLEngine on
    SSLCertificateFile /etc/ssl/certs/apache.crt
    SSLCertificateKeyFile /etc/ssl/certs/apache.key
    SSLCertificateChainFile /etc/ssl/certs/apache.crt
    LogLevel debug
    ErrorLog /var/www/ws/logs/error.log
    TransferLog /var/www/ws/logs/access.log
    php_value include_path .:/usr/share/pear:/var/www/ws
    Alias /ws /var/www/ws
</VirtualHost>

Open in new window



Any ideas?. Is it possible to do this using .htaccess?
0
I am running a LAMP stack. I have the domain example.com registered. I created an Apache virtual site with ServerName example.com and ServerAlias www.example.com.

I did not create any subdomains on the Godaddy website. I was under the impression I just needed to create another Apache virtual host.

I created a new host that pointed to a new directory. The ServerName was forums.example.com and the server alias was www.forums.example.com.

I enabled the site and reloaded Apache and when I try to visit forums.example.com I get a DNS error.

Does the answer lay in my Apache configuration file, or in subdomain settings from Godady?
0
I have a virtual Debian web server running apache 2.2.22 with an ssl enabled vhost.  I am trying to disable SSLv3 and no matter what I do there seems to be no change when I rescan the website with Comodo or SSL labs.  I have tried editing:

/etc/apache2/mods-available/ssl.conf
/etc/apache2/sites-available/default-ssl

... by either adding or changing the existing parameters for:

SSLCipherSuite
SSLHonorCipherOrder on
SSLProtocol all -SSLv3 -SSLv2

And after every change I run service apache2 restart

I also grep'd the /etc/apache2 directory for those ssl variables thinking they were coming from somewhere else but they are not.

Ultimately I am trying to switch the site over to TLS and dump SSLv3 but I just can't make an impact...
0
I had this question after viewing apache with rotatelogs not working  : error while loading shared libraries: libaprutil-0.so.0.

I too got similar issue like   HTTP_Server~1.log   shows error  when opmn / http started .
0
Hello!. I am trying to figure out what the the problem with my configuration is. I have apache 2.4.29 with mod_cluster configured like this:

<IfModule manager_module>
	Listen 172.16.10.60:10001
</IfModule>

<VirtualHost *:80>
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>
<VirtualHost *:10001>
	<Directory />
    	Require all granted
    </Directory>
    ServerName myservername.com
    <IfModule manager_module>
    	ManagerBalancerName innovateperu
        AllowDisplay On
        KeepAliveTimeout 300
        MaxKeepAliveRequests 0
        ServerAdvertise on 172.16.10.60:10001
        AdvertiseFrequency 5
        AdvertiseGroup 224.0.1.100:23366
        EnableMCPMReceive On
        <Location /manager>
        	SetHandler mod_cluster-manager
            Require all granted
        </Location>
        <Location />
        	Allow from all
        </Location>    
    </IfModule>
</VirtualHost>

Open in new window


My nodes are configured with wildfly 10.1.0.Final

I have tried this:

  1. Access the context using the node address. It works
[list=2]Access the context using the load balancer address. It works partially. This is weird because I can see the login form of my project, I can event log in however when I try to access another war from the menu, I receivethis error "Gateway timeout". [/list]

Does anyone have a clue?
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.