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

I designed an API that looks like this:

Items:
http://mysite.com/subfolder/api.php?resource=items&action=getAll   (get all items)
http://mysite.com/subfolder/api.php?resource=items&action=getById&id=1234   (get item by id)

Open in new window


Orders:
http://mysite.com/subfolder/api.php?resource=orders&action=getAll
http://mysite.com/subfolder/api.php?resource=orders&action=getById&id=678

Open in new window


Desired Re-Write
http://mysite.com/subfolder/api/items/getAll
http://mysite.com/subfolder/api/items/getById/1234

http://mysite.com/subfolder/api/orders/getAll
http://mysite.com/subfolder/api/orders/getById/678

Open in new window


Is this impossible because they use the same names???

I have no experience using re-write with Apache.

Thanks for looking.
0
Hello i'm configuring the Owncloud X Appliance and have some questions that i can't find answer

1- It’s now accesible from the web by here
https://owncloud.domain/ownCloud
but user can still access this page
https://owncloud.domain/univention/portal/#category=software
Is there a way to deny access to this page https://owncloud.domain/univention/portal/#category=software and just have access to https://owncloud.domain/ownCloud


2- How can i change owncloud url to : https://owncloud.domain/ instead of https://owncloud.domain/ownCloud
i found this link https://doc.owncloud.org/server/10.0/admin_manual/installation/changing_the_web_route.html but it don't seem to be relate to the appliance

3- If i want to increase space on the appliance once ive add more space on my lun what other step i need to do

Thanks for helping me !
0
I have recently set up a proxy server using apache. However I randomly receive this message "502 Proxy error : Error reading status line from remote server".
What is supposed to be the proper way to solve this issue?. I mean, I prefer not using fixes like the ones I had to include to getr rid of this error temporally

        SetEnv force-proxy-request-1.0 1
                SetEnv proxy-nokeepalive 1
                SetEnv proxy-initial-not-pooled 1

Open in new window


This is my configuration:

<VirtualHost *:443>
        ServerName subdomain.mydomain.com
        ProxyHCExpr ok234 {%{REQUEST_STATUS} =~ /^[234]/}
        <Proxy *>
               AddDefaultCharset off
               Order deny,allow
        </Proxy>
        <Proxy balancer://hostingCluster>
               BalancerMember http://server1:80 timeout=10 retry=3 hcmethod=HEAD hcexpr=ok234 hcinterval=10
               BalancerMember http://server2:80 timeout=10 retry=3 hcmethod=HEAD hcexpr=ok234 hcinterval=10
               ProxySet lbmethod=byrequests
               ProxySet stickysession=PHPSESSID

                SetEnv force-proxy-request-1.0 1
                SetEnv proxy-nokeepalive 1
                SetEnv proxy-initial-not-pooled 1

        </Proxy>
        <Location /manager>
                SetHandler balancer-manager
                AuthType Basic
                Require valid-user
                AuthUserFile /var/www/.htpasswd
                AuthName "Authorization Required"
        </Location>

Open in new window

0
I need to disable the POODLE vulnerability.  I have Centos 7.5 and
OpenSSL 1.0.2k-fips  26 Jan 2017

Open in new window

and I have ran yum update openssl and nothing qualifies.  I added the line
SSLProtocol All -SSLv2 -SSLv3

Open in new window

in
/etc/httpd/conf.d/ssl.conf

Open in new window

- I then restarted httpd.

Yet when I run my cert against https://www.ssllabs.com free ssl checker I still show a POODLE vulnerability.

Please tell me how to get rid of this vulnerability.

Thanks,
0
I'm migrating my website to a secure server, and there is an issue with a page which isn't loading all the content.  Google Chrome Developer Console reports an "uncaught DOMException".  I'm not a programmer, and don't know how to interpret or correct this.  I've uploaded a screen shot.

The website is under development on a server which is not open to the public.  If you are sufficiently interested in visiting the page in question, the Windows hosts file would need to be modified by adding "199.168.187.45  mauitradewinds.com www.mauitradewinds.com secure.mauitradewinds.com   m.mauitradewinds.com".  In that case, the page with the issue could be visited at https://mauitradewinds.com/RezEasy/mobile/0001/cl0001.html    Otherwise, perhaps the screen shot is adequate for you to provide some guidance for me.  Thank you. Screenshot of DOMException error
0
I am managing  a very old XAMPP installation (1.7.3) which has been absolutely rock-solid for years.  Now, unfortunately, the company that provides a payment gateway that the system has been connecting to has decided to upgrade from TLS1.0 to TLS1.2 (for obvious reasons).  The version of PHP running on the install is 5.3.1 which comes with CURL 7.19.6

This version of CURL does not support TLS 1.2 encryption, the earliest version that does is CURL 7.34.0

As a quick fix, I've tried to upgrade the PHP installation to the latest one (7.26 I think) however, both methods I've tried result in Apache failing to restart - does anyone have any suggestions as to how I can upgrade the CURL or PHP?  Failing that, is there any alternative to CURL which will encrypt the data correctly, i.e. to TLS1.2 standard.

The XAMPP is running on Windows 7 64 bit
0
Dear Experts

We are using nextcloud which is on ubuntu 16.04 with php, mysql and apache until now we were using within the local network but now there is a requirement to enable this to external network that is from internet hence would like to procure ssl certificate and install the same,
1.  can you please suggest the good source to purchase the ssl certificates
2. at present users are using this solution  by installing the ssl certificates will it have any impact of not functioning or breaking down the system please suggest.
3. can you please help me how to install the ssl certificate in this server instance
0
This is to migrate the existing SuSE Linux Enterprise server 11 (think with SP1) to another newly-setup SuSE Linux Enterprise 11 with SP4. This existing server is hosting apache, and supporting an oracle via PHP. The main thing is, we also have to configure the new SuSE to have PHP supporting Oracle with the following working descriptions from the application owner as follows,

           - Apache connecting to PHP accessing a Oracle table through Oracle instant client

with this requirement:
1)      the PHP has to be compiled to enable Oracle instant client
2)      apache has to have the connector configured (not shown here ) and recompiled

So far, on this new SuSE, a apache and associated modules were installed. When typing "rpm -qa |grep apache", the results shows,

      apache2-prefork-2.2.10-2.18
      apache2-utils-2.2.10-2.18
      apache2-mod_python-3.3.1-147.19
      apache2-mod_php5-5.2.6-50.17
      apache2-2.2.10-2.18
      apache2-mod_perl-2.0.4-40.19

How should we proceed from here?

thanks in advance.
0
Running WampServer 2.2 on a Windows 7 platform, a problem has developed.  I am unable to start the WampApache service.  There are Event Viewer errors specifying a syntax error at the line which designates the documentroot, and the statement "DocumentRoot must be a directory".  The document root IS a directory, and I have not changed hppd.conf for many years.  WampServer worked fine until just now.  I experimented with the syntax, even changing the DocumentRoot to "C:\", and got the same errors.  I am inexperienced with this application, and would appreciate suggestions.
0
PHP website using sessions.  We original started development on our Ubuntu Apache system.  After 99% was complete we uploaded to the intended hosting package and found that the session commands we used and worked fine on our Apache development system would not work on the hosting package.  We were getting header already sent errors, but only on the shared hosting package that we purchased.  So we dove a little deeper and in simple terms we moved the session_starts to the top of the files and that seemed to resolve that issue.  However, not that the code is changed, the website is having problems on our development box.  When we try to access our "ADMIN" section which requires a login, we receive too many redirect errors.  However, the same code works on the hosting package. In the Admin section the index.php (admin is in a subfolder off of the root of the site) it includes our "Navigation" file which is basically the top menu of all of the pages.  In that Navigation file, the line "if(!isset($_SESSION['views'])){header("location:index.php");}" seems to be what is causing the error "ERR_TOO_MANY_REDIRECTS" in the browser.   So there is a two fold question here.  What is the problem with this, and why would it work on our hosting package but not on our development box?   Any help would be GREATLY appreciated.
0
Hello Fellow Experts,

I'm trying to get PHP PDO to work with an MS SQL database.  PHP returns a "driver not found" error. I've tried copying the "sqlSvr" driver files to the extensions folder and editing the ini file as suggested by various forums and tutorial, but the error still shows up.  

This needs to be done both on my local Windows Xampp (PHP v5.6) installation and on the remote Linux server (PHP v5.3).  Niether works, what am I possibly missing?

Also, where do the extensions go on the Linux server? Can I just create an "ext" folder in the remote server's "root" folder?  The folder structure looks different on the remote server; there isn't an "ext" folder like in my Xampp environment.

Thanks.
0
I'm troubleshooting a site which resides on a secure server, not available to the public.   It would be helpful if my browser could access the cgi-bin directory, but this is apparently forbidden by default on an Apache server.  Is there a client-side solution to allow browser access, such as htaccess?  If so, could you provide code?
0
I'm migrating my website to a secure server, and a certain cgi script is not being found when it is needed.  I've attached an excerpt from the server's error log, specifying what happened.  I don't know how to interpret this error log text, or how to remedy the issue.  The script which isn't being found is properly situated in the cgi-bin folder.Error-loading-SecureForm.txt
0
I'm migrating my website to a secure (https) server.  There is code in htaccess which is unintentionally redirecting browsers to the non-secure (http) website.  The purpose of this code was to redirect requests for mysite.com to www.mysite.com.   If possible, I'd appreciate code which would redirect requests for http://mysite.com or http://www.mysite.com  or https://mysite.com  to https://www.mysite.com   However, an exception must be made for a few pages which present a scrolling, panoramic view, because those pages don't perform correctly when there is a www. prefix...

Here is the code which is presently causing an unwanted redirect to the non-secure server...

# redirect entire site from non-www to www except Panoramic View pages
RewriteCond %{REQUEST_URI} !^/viewtriage.htm$
RewriteCond %{REQUEST_URI} !^/view.htm$
RewriteCond %{REQUEST_URI} !^/viewipad.htm$
RewriteCond %{REQUEST_URI} !^/viewother.htm$
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
0
Hi Team,

Getting 504 gateway timeout error while browsing hosts.
Below is the error getting from server end where site is hosted.

[Wed Jun 27 06:35:48.634539 2018] [:error] [pid 5821:tid 139690111854336] [client 10.0.1.14:27642] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; backup_file has a deprecated constructor in /var/www/html-customers/sites/all/modules/contrib/backup_migrate/includes/files.inc on line 121

Request you to help me to fix this uissue.

Regards,
Rituraj
0
Hi guys I have this rules in my htaccess to enabled my ssl and redirect all request from https://myserver.com to https://www.myserver.com, i wanna know if are ok or do i need to remove a line or add someone

RewriteCond %{HTTP_HOST} myserver\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.myserver.com/$1 [R,L]
RewriteCond %{HTTP_HOST} !^www.myserver.com$ [NC]
RewriteRule ^(.*)$ https://www.myserver.com/$1 [L,R=301]

I hope you can give an advice about it

Thx in advance
0
I'm migrating my website to a secure server, but certain pages do not load.  Instead, the 404.htm page loads.  I don't understand why this is happening.  
For example if you navigate to https://secure.mauitradewinds.com/RezEasy/mobile/0001  you will see several files in that folder.  Clicking on any of them results in the 404 error.  This doesn't happen on the same site which is still hosted on our non-secure server at http://mauitradewinds.com/RezEasy/mobile/0001 .   I'd appreciate any insight about resolving this.
0
I am getting this error when I try to upload an image to my server.  I haven't change anything except for the normal centos updates.  Here is the error:

https://gyazo.com/03f0e39e905cdeddda55c2629a53b7b9

This is also affecting my ability to update a plugin.  Where I get this error:

https://gyazo.com/ef7f4ed9f0d28e9d9cfa4a40a3536e02

I have used this writeup to try and fix the problem.  However, nothing changed.  

http://www.wpbeginner.com/wp-tutorials/how-to-fix-image-upload-issue-in-wordpress/

Please help me get this working again.
0
I hope you can help me with this

in my htaccess I add this rule RewriteRule ^pruebas/(.*).php$ /oculto/controladores/php/$1.php [L,NC,QSA]

This rule allow me to redirect this kind of url "http://grupossc.com/pruebas/the_test.php", this rule work without problems.

but when I try  to use for example that link with a php include statement like <?php include ("pruebas/the_test.php"); ?> to import a php file with some functions it doesnt work

What Im doing wrong??? it is possible to use a redirected url inside of a php include statement?
0
I can't figure out how to disable insecure cipher suites in openssl and Apache.

I've been messing around with the configuration and using ssllabs to test the results, but nothing I change seems to make any difference.
My current relevant item in the ssl.conf file are:
SSLProtocol all -SSLv2 -SSLv3 -TLSv1
SSLCipherSuite !aNULL:!MD5:!SEED:!IDEA:!RC4-MD5:!RC4-SHA:!ECDHE-RSA-RC4-SHA:HIGH

SSLabs reports among others, the following problem:
TLS_RSA_WITH_RC4_128_MD5 (0x4)   INSECURE
 
I found a site that converts RFC names to openssl names, and that's where I got the RC4-MD5... items. That protocol should be disabled by the !RC4-SHA directive but it's not.

As you can see I've asked apache not to accept TLSv1 and a couple of RSA ciphers.  I always restart the httpd service between tests, but I still get the same results.  I'm not sure what I'm missing.
0
I need to add a rule to my htaccess file that re-writes all uppercase letters in a url to lower case.  I tried to follow the instructions on this page to no avail:
https://www.askapache.com/htaccess/rewrite-uppercase-lowercase/

Can anyone help?

my htaccess
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://MYSITE.com/$1 [R,L]

#For Elegant Theme Support 2/28/2018 - JNL
#<IfModule mod_substitute.c>
#SubstituteMaxLineLength 20M
#</IfModule>

# 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

0
I am moving a site to WooCommerce which uses different url's that my old Prestashop site.  I have found that the old url's are going to the home  page instead of showing a 404.  I need to remove whatever is going to the home page.  This is because I want to run xml-sitemaps.com to find the broken links.  However, they aren't showing up because they are going to the home page automatically.

This is the .htaccess in the public directory where wordpress resides

# 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


Please tell me how to get these old links to show a 404.

Thanks,

Randal
0
this is make me crazy

check this link: http://www.gruposc.com/industrias/Aeroespacial-Defensa

I dont know why when you enter to any of my SEO links with "industrias/" you will redirected to "www.sancayetano.es" for example: http://www.sancayetano.es/industrias/Aeroespacial-Defensa

As far I do remeber I never add any redirection to that server,

In my htaccess this is the line that redirect my SEO links with "industrias/" to an internal page in my site: RewriteRule ^industrias/([a-zA-Z0-9-/?=&]*)$ /oculto/industria.php?rID=$1 [L]

Please help

Best regards.
0
Hello everyone!

I was wondering how to set a rewrite rule on the httpd.conf rather than placing a .htaccess on every location

My directory structure:
https://mydomain.com/services/name/rest/index.php
https://mydomain.com/services/name/rest/.htaccess

How to invoke:
https://mydomain.com/services/name/rest/operation/value

My .htaccess content:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^((?s).*)$ index.php?_action=$1 [QSA,L]
</IfModule>
0
I am attempting to enable HSTS on our local web server (running on Apache 2.4.16 - on Mac OS 10.10.5 Yosemite) along with disabling weak ciphers along with disabling SSL 2.0 and 3.0.  I've attempted to make use of guides provided by SSLShopper and Raymii to get this done. I feel like I'm pulling my hair out over something potentially simple but I've made the suggested additions to Apache config files (httpd.conf and ssl.conf). I've restarted Apache and every running subsequent checks via SSL Labs, etc. results in neither of these things being shown as accomplished.

Kinda inherited this server from a prior person who left zero documentation (which was originally on Windows Server 2008 R2 and was converted over to Mac OS Server). I'm not exactly well-versed in this sorta thing but I assumed I could follow the directions as stated :|

I'll include, for example, what's in the HTTPD-CONF file. Again, probably something really silly or simple I'm missing but I'm at a loss at this point:

#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see 
# 

Open in new window

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.