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

Hi

I'm in the process of building a website it's still at the early stages on a local machine

Is it possible to view this over the internet just with a ip address  or do I need to register a domain?

What steps within windows are there to do this?

I'm running WAMP
0
Simple, centralized multimedia control
Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

Have a website.  I am trying to create a test website based on the main website to troubleshoot an issue.  I created the site using FileZilla.  I copied the files from the main site "internal.mysite.com" to "internaltest.mysite.com".

I logged into apache and modified the apache.conf file using "sudo nano /etc/apache2/apache2.conf"

Copied below
<VirtualHost *:80>
   DocumentRoot "/home/webserver/www/internal.mysite.com"
   ServerName internal.mysite.com
   <Directory "/home/webserver/www/internal.mysite.com">
       Require ip 172.16.2.0/24
       Require ip 172.16.10.0/24
       Require ip 172.16.20.0/24
       Require ip 10.0.0.0./255.0.0.0
       Require ip 127.0.0.1
   </Directory
</VirtualHost>

Open in new window


To
<VirtualHost *:80>
   DocumentRoot "/home/webserver/www/internaltest.mysite.com"
   ServerName internaltest.mysite.com
   <Directory "/home/webserver/www/internaltest.mysite.com">
       Require ip 172.16.2.0/24
       Require ip 172.16.10.0/24
       Require ip 172.16.20.0/24
       Require ip 10.0.0.0./255.0.0.0
       Require ip 127.0.0.1
   </Directory
</VirtualHost>

Open in new window


Then hit ctrl+x and then Y for save

Restarted server with "sudo service apache2 restart".

Server restarted successfully.

I can access internal.mysite.com but internaltest.mysite.com returns a DNS error -> can’t find the server at internaltest.mysite.com.

I did the exact same steps to a previous site and it works but this one is not.

I also checked the file permissions and ensured that internaltest.mysite.com matched internal.mysite.com.

Any ideas?
0
Interestingly enough I have no problem using let's encrypt on Windows platform and figured it was going to be a breeze on *nix... Running into a slew of issues.  For one I am trying to use certbot to facilitate this.  When I issue the correct commands and webroot I see it builds the .well-known folder but it does not build the acme-challenge folder.  If I try to manually create the acme-challenge folder it deletes it after the sudo certbot certonly --webroot -w /var/www/example -d example.com -d www.example.com command (with my domain info substituted of course) with the following error:

Detail: Invalid response from
   http://<mysite>/.well-known/acme-challenge/bM6ijKNrbr6Dcf3nzJdyhssFHrySeeLk-2VWQgAlWnQ:
   "<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
   <html><head>
   <title>403 Forbidden</title>
   </head><body>
   <h1>Forbidden</h1>
   <p"
Super frustrated as everything in *nix is always easier, right?  Well not this time LOL.   Any suggestions would be appreciated!

-J
0
I would like all three of these:

http://domain.com
http://www.domain.com
https://domain.com

...to redirect to:

https://www.domain.com

I would like to "keep" anything after the .com, such as:

/page.htm
?script.php?abc-123

I'd also like to keep the domain generic, so I can reuse this code for many websites.

Can it be done? I have seen various examples of parts of this, but haven't found a comprehensive solution.

Thanks!
0
AuthType Basic
AuthName "Auth Required"
AuthUserFile C:/xampp/apache/bin/passwordfile
Require valid-user
# allow public access to the following resources
SetEnvIf Request_URI "(path/to/directory/)$" allow
SetEnvIf Request_URI "(C:/xampp/htdocs/TickTock_int/results_invoices_IDsel_Client.php\.php)$"  allow
SetEnvIf Request_URI "(util)$"  allow
Order allow,deny
Allow from env=allow
Allow from ::1
Satisfy any

Open in new window


I am trying to allow access through my xampp .htaccess file to the referenced php page above
Problem is the .htaccess is still active when I access this page externally
0
Hi!

I hope you are well.

I am having the following issue which I'm hoping someone can help me with.

I am trying to create a wordpress site hosted in my machine and using xampp to do so.

I was successful initially and could start wi¡orking on the site but suddenly the apache service on xampp would not start. I read that this could be resolved uninstalling apache from  the computer with the console and installing xampp again which did resolve it but now I get the following error when I type http://localhost/C:/xampp/htdocs/wordpress/nomind on the browser to biuld the site:

Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.

Error 403

localhost Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30

I downloaded wamp and had the same problem, also xampp on another computer I have at home and also had the same issue. I even restored my computer since I did not had the problem initially but it did not help.

Thank you very much in advance for your time and help!!!
0
How would I do the following?

https://www.domain.com/33434343_5443.pdf

RewriteRule ^(.+\.pdf)$ open_pdf_file.php?pdf_file=$1 [NC,L]

Open in new window


However, this rule does not appear to work.
0
I'm running Apache 2.4 and I'd like to see the values being received for some HTTP variables, like HTTP_ACCEPT.   Thanks for any help.
0
I was looking at WordPress. Never used WordPress before. Looking at the Business plan. Is the plan $24.92/monthly or 1 payment of $24.92 for 1 year?

I would like to create a blog Unlimited Storage Space to add videos etc. Kind of like worldstarhiphop

Is there a FREE service somewhere else that supports Unlimited Storage Space? Is there a WordPress alternative that has the features of the Business plan that's free?
0
I need to write a rule in my apache htaccess file to redirect:

/insurance-plans/year/schools/international-student-plans-2015?s=136&l=5000
to:
http://%{SERVER_NAME}/insurance-plans/year/schools/international-student-plans-2017?s=136&l=7000

The rule I wrote is as follows, but it does nothing:

RewriteRule ^insurance-plans\/year\/schools\/international-student-plans-2015?s=136&l=5000$		http://%{SERVER_NAME}/insurance-plans/year/schools/international-student-plans-2017?s=136&l=7000	[R=301,L,NC,NE]

Open in new window


I'd be grateful if someone would show me the correct htaccess code to implement my redirect.

Thanks,
Jon
0
Create the perfect environment for any meeting
Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Hello experts,

Need some help

We have migrated a website from cpanel accelerated2 to another hosting provider who provided latest version of cpanel. The transfer was successful. However while browsing the website we are seeing below error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@xxxx.com to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

I have gone through the error logs in cpanel which is logging below error everytime the domain is accessed.

corealert: pid xxxxx /home/xxx/public_html/.htaccess unknown filter provider deflate

At first we though php version 5.4 not installed is the issue, we have installed 5.4 via cpanel and restarted the http webserver but still same error.

Unable to understand where to look for

Any help is appreciated.

Thank you

best regards
0
For rewrite rule in httpd.conf, it seems following condition & rule should apply:
1. If URL contains string "usedirectory=yes"
Rule: Do nothing

Like following:
Original URL:https://conpoc.acme.com/communities/service/html/community/autoCompleteMembers.do?format=v2&includeGroupMembers=yes&includeExternal=no&member=doe.john&usedirectory=yes
Rewrited: No change

2. If If URL contains string ”autoCompleteMembers.do“ and not contains usedirectory=yes
Rule: Append usedirectory=yes to original query string

Like following:
Original URL:https://conpoc.acme.com/communities/service/html/community/autoCompleteMembers.do?format=v2&includeGroupMembers=yes&includeExternal=no&member=doe.john
Rewrited:
https://conpoc.acme.com/communities/service/html/community/autoCompleteMembers.do?format=v2&includeGroupMembers=yes&includeExternal=no&member=doe.john&usedirectory=yes

I tried following but not working

<VirtualHost *:443>
     ServerName conn6.win.com
     SSLEnable
     SSLProtocolDisable SSLv3 SSLv2
     RewriteEngine on

     RewriteCond %{REQUEST_URI} ^/communities/service/html/community/autoCompleteMembers.do
     RewriteCond %{QUERY_STRING} ^(.*)format=v2&member=(.*)$
     RewriteCond %{QUERY_STRING} !usedirectory
     RewriteRule ^/communities/service/html/community/autoCompleteMembers.do(.*) /communities/service/html/community/autoCompleteMembers.do?usedirectory=yes  [R=301,NE,L,QSA]

</VirtualHost>
</IfModule>
0
I want to put a mod_rewrite rule in httpd.conf to handle mobile requests. If the browser on the sending device accepts mobile stuff, I want to rewrite the request to the original file name with an "m_" in front. So if a mobile device sends

https://example.com/51/a1.html
I want to rewrite it to

 https://example.com/51/m_a1.html
I have the lines below now in httpd.conf:

RewriteCond %{HTTP_ACCEPT} "text\/vnd\.wap\.wml|application\/vnd\.wap\.xhtml\+xml" [NC]

RewriteRule ^example.com/([0-9]*)/(.*)$ ^example.com/$1/m_$2
But requests from a mobile device don't get rewritten. Does anyone see the problem?

Thanks
0
Hi Experts

I need an htaccess rewrite rule to redirect from the following URL format:

xyz.com/ABC123

to the following URL format:

http://abc.com/parm?Search.Active=True&Search.SerialType=1&Search.SerialNumber=ABC123&%23=FIND+ASSET

Note that the part marked in bold is a variable that will change. It can contain one to three letters and/or one to three numbers and can be a minimum of 1 character in length and a maximum of 6 characters in length.

What is the rewrite rule that I need please?

Thanks
0
My site httpS://www.mysite.org and, my subdomain http://subdomain.mysite.org  are working fine. My problem is when I forgot to put httpS on mysite.org (Ex.: http://www.mysite.org) the browser goes to  http://subdomain.mysite.org.

How to solve this problem ?
0
I want a tool that will run through our website once daily and send a report of any broken links it finds. I can do it either in VB and use Access 2003 here at the office or I can install it as a php app on our  web server.

Any ideas?
0
I am having little difficulty in resolving one URL redirection in remote location. Example: My website is https://temp.company.local/dev/rel and it's accessible through Remote host. However, when user requests for https://temp.company.local, he is getting redirected to Apache manager page which I don't want. Can you please provide a solution to fix this problem so that only proper URL will work and half will not redirect to tomcat manager page?
Just to update I'm not using IIS.

Best Regards,
Abhi
0
Dear experts,
We have a HAProxy installation with SSL-Passthrough (we need the SSL to reach the apache itself for proper HTTP/2 handling so we can't use SSL termination on HAProxy)

However, I can't seem to configure the HAPrxoy to send the real IP to Apache, the logs always show the internal IP of the HAProxy.

This is my HAProxy Config:

#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
    log         127.0.0.1 local2     #Log configuration
 
    chroot      /var/lib/haproxy
    pidfile     /var/run/haproxy.pid
    maxconn     30000                
    user        haproxy             #Haproxy running under user and group "haproxy"
    group       haproxy
    daemon
 
#---------------------------------------------------------------------
# common defaults that all the 'listen' and 'backend' sections will
# use if not designated in their block
#---------------------------------------------------------------------
defaults
    mode                    http
    log                     global
    option                  httplog
    option                  dontlognull
    option http-server-close
    option forwardfor       except 127.0.0.0/8
    option                  redispatch
    retries                 3
    timeout http-request    10s
    timeout queue           1m
    timeout connect         10s
    timeout client          1m
    timeout 

Open in new window

0
When I execute my PHP program in netbeans it goes to this address
http://localhost/CoffeeWebsite/index.php

But I change the address in my wamp server to port 81. My question is where I do change in the netbeans so that every time when i run my program it goes to that address. My operating system is windows 7

http://localhost:81
0
Flexible connectivity for any environment
Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

im trying to get a .htacess files working, so a url such as http://mydomain.com/incidents/32111/comments turns into http://mydomain.com/index.php?P1=incidents&P2=32111&P3=comments, I managed to get it working, but it redirected everything to index.php, including all images, css and js files (which didnt really work), and now nothing redirects

So, what Ive currently got is:-
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_URI} !=/index.php
RewriteCond %{REQUEST_URI} !.*\.png$ [NC]
RewriteCond %{REQUEST_URI} !.*\.jpg$ [NC]
RewriteCond %{REQUEST_URI} !.*\.css$ [NC]
RewriteCond %{REQUEST_URI} !.*\.gif$ [NC]
RewriteCond %{REQUEST_URI} !.*\.js$ [NC]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

Open in new window


I cant find much documentation around .htacess files so any suggestions would be gratefully received.

Thank you in advance
0
How to I configure XAMPP so that I can use it with net beans?
screenshot.PNG
0
Can you please tell me how to I fix that error? I am using netbeans and wamp in windows 7 environment.
screenshot.PNGscreenshot2.PNGscreenshot3.PNG
0
Hi,

I've spent a few weeks messing around with nginx to get to grips with it before I migrate my Wordpress site, (currently on Apache).

One thing can't work out is, In Apache I have a rewrite (in .htaccess) that redirects any request for

http://www.mysite.com/KB/Article/000001.htm
to
http://www.mysite.com/KB/Article/000001

It's because the site was originally written in flat html and theres thousands of links going to the old URLs.

In Apache this did the trick
-=-=-=-=-=-=-=-=-
RewriteEngine On
RewriteBase /
RewriteRule ^KB/Article/(.*).htm  http://www.mysite.com/KB/Article/$1 [L]
-=-=-=-=-=-=-=-=-

How Do I do the same thing in nginx? I'm assuming I add the redirect to my
/etc/nginx/sites-enabled/default
File, as that the one the test site is using;

-=-=-=-=-=-=-=-
# Default server configuration

server {
      listen 80 default_server;
      listen [::]:80 default_server;

# Set The Root Directory for the Entire Website

      root /var/www/html/;

# Add index.php to the list if you are using PHP

      index index.html index.htm index.nginx-debian.html;

# Add The Server IP Address or FQDN

      server_name 123.123.123.123;

# The following does the WorkPress Rewrites for the permalinks
      
      location / {
        index index.php index.html index.htm;
        try_files $uri $uri/ /index.php?$args;
   
      }

# pass PHP scripts to FastCGI server

       location ~ \.php$ {
    fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    fastcgi_param …
0
please provide soluation of this error message
0
Hello
I have a problem where my javascript and css files are being read from the cache instead of when I do refresh for new content so it never updates. I am using firefox and wamp server and in firefox disabled privacy.trackingprotection, have selected always look for new pages in web developer tools and put wamp in offline mode.

Is it apache that is caching these files? Here is the exact message in the net tab of firebug. How can I solve this so my content is always updated. Thanks

The request was resolved directly from the cache, so we have no response from the server. See below for the cached response.

Open in new window

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.