Apache Web Server

20K

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'm migrating data over from and old server. all data is under the same username:group --- constantly:constantly
example: drwxr--r-- 10 constantly constantly 4096 Apr 10 12:31 albums

i'm reinstalling "gallery" and i notice in setup(setup is done via the web interface), if the folders are not with the permissions apache:apache, setup fails.  "There was an error creating the directory structure within the storage directory. " Seems like Apache doesn't have permissions to other users folders.

How do i allow apache server to run as another user so files don't need to be under apache:apache? i shouldn't have to do the chown for it to work.  

I've never had an issue like this in the past.  Hopefully i'm making some sense here :)
0
Although I've seen https in URLs countless times, I've never really explored in to how to set up such a thing.

When people say "setting up SSL", this is what they're talking about, right? I mean the end result will be the use of https in the URL?

I know if I called up my web host and told them I'd like my URL to be https instead of just http, they'll do it for me, but is this something I can do on my local Apache server as well? Is it hard to set this up?

Thanks.
0
General question about architecture

I have a home server on which I've got 2 virtual servers.  What I'd like to do is to install an evaluation copy of a process modelling tool like bizagi for example onto the server and make examples of my work available through a web server to demo to people.

With my limited knowledge I'm thinking that I'd have a web-site I'm imagining on a LAMP server on the ubuntu VM.  
The process modelling tools tend to just be available on windows so will it be possible to have diagrams etc. I've done on one server (windows) available to demo on the website hosted on a web server on ubuntu? Does this seem a sensible approach?  

The diagrams would need to be viewed through the software, They will be written in BPMN 2.0 which is a standard (available as 2 XML files but I'm not aware of tools in ubuntu to display BPMN files?)

Should I be looking at a purely windows web-server (does such a thing even exist?)

Kind regards,

Anthony
0
In ALL my pages (except the login.php, which simply destroys the session), I have the following code at the very top:

session_name("nd");
session_set_cookie_params(60*60*8); // 8 hours
session_start();
if (isset($_SESSION['user'])) {
    $user = $_SESSION['user']; // This is a User class object
} else {
    /* session expired */
    header("Location: ", 'login.php');
}

Open in new window


I have Windows Explorer open to C:\xampp\tmp, which is where Apache creates the session files. I noticed that every time I traverse to another page, a new session file is created. So after traversing through 5 pages, I now see 5 files. What's bizarre though is that only one of them would contain the User object information at any given time, and the rest are just empty files.

I'm confused! On the one hand, I was assuming there would only be ONE file for my session. But even with all the multiple session files being created, only ONE of them contains the User object data at any given time. So this is telling me that despite multiple files being created, only one of them really contain my session data. Is this normal behavior????

Also, if my code is flawed/lacking in any way, please tell me. This is my first time trying to incorporate session management into a PHP application, so I would appreciate any advice from the more experienced PHP developers among you. Thanks.
0
I store my data on a separate partition which allows me to regularly restore my windows system partition to an earlier state without having to worry about losing any data.

Of course, I have to re-install/re-configure anything that I had done since the creation of that system partition version I've just restored.

It occurs to me that certain OS-agnostic software packages don't use the Windows registry, which to me means I could 'install' them on a non-system partition; this would save me from having to re-install them/update them after restoring a system partition image prior to me having installed/updated these packages.

I believe PHP and Apache to be such packages; wondering about MySQL.

Seems Composer and any packages I install using Composer qualify too.

Looking for confirmation of the packages before I start moving them off my system partition and reconfigure accordingly.
0
Hi I have two servers. Both are ubuntu servers.

I have apache installed on one and the other has storage of mp3's. I am using html5 audio player on my web server, I can easily access play local files on the web server. Can anyone give me pointers on the best way to access files on the other storage server?

Would it be best to use SSH or the likes?

Thanks.
0
When trying to create  VirtualHost on Apache it get the following error on restart of htttpd

sudo service httpd restart

Stopping httpd:                                            [  OK  ]
Starting httpd: AH00112: Warning: DocumentRoot [/var/www/html/dstubblefield.com\xe2\x80\x9d] does not exist
                                                           [  OK  ]

I have created the vhost.conf  in  /etc/httpd/conf.d/vhost.conf and added the following and saved.

<VirtualHost *:80>
ServerAdmin drew@dstubblefield.com
DocumentRoot "/var/www/html/dstubblefield.com”
ServerName dstubblefield.com
</VirtualHost>

The folder /var/www/html/dstubblefield.com was created with permissions 775

There must be something simple that I am missing - Thanks
0
Dear All:

Due to company re-brand, We are changing our URL domain.

Isn't possible to redirect the old ssl (invalid SSL cert) to new https (with valid SSL)?

I already setup auto redirection but a warning message will prompt (due to invalid SSL cert) before redirect to new URL (with valid SSL).

* In LAMP environment, CENTOS 6.5

Thank you.
0
I have set up several virtual hosts on a development server. My developer wants me to set up SSL for two of 8 instances. Since I have a *.mydomain.org certificate. Would I set it up to be used between those two instances/websites?

I got the ssl configuration file under /etc/httpd/conf.d/ssl.conf, the related section is as below:

<VirtualHost *:443>

# General setup for the virtual host, inherited from global configuration
    DocumentRoot "/var/www/lac2014/html"

    ServerName devw.mydomain.org:443

    ServerAlias devw 
    <Directory "/var/www/lac2014/html">
      AllowOverride All
    </Directory>

# Use separate log files for the SSL virtual host; note that LogLevel
# is not inherited from httpd.conf.
    ErrorLog logs/ssl_error_log
    TransferLog logs/ssl_access_log
    LogLevel warn

#   SSL Engine Switch:
#   Enable/Disable SSL for this virtual host.
    SSLEngine on

#   SSL Protocol support:
# List the enable protocol levels with which clients will be able to
# connect.  Disable SSLv2 access by default:
    SSLProtocol all -SSLv2 -SSLv3


#   SSL Cipher Suite:
# List the ciphers that the client is permitted to negotiate.
# See the mod_ssl documentation for a complete list.
    SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW

#   Server Certificate:
# Point SSLCertificateFile at a PEM encoded certificate.  If
# the certificate is encrypted, then you will be prompted for a
# pass phrase.  Note that a kill -HUP will prompt again.  A new
#

Open in new window

0
I have running apache web (httpd) and application(tomcat) in the same host. And I would to auto point to a sitedown.html page whenever application(tomcat) server is not responding (incase of HTTP status code 502 and 503).

I saw below example on the few forum and would like to understand how does it works.

ErrorDocument 502 /sitedown.html
ErrorDocument 503 /sitedown.html
ErrorDocument 403 /404.html
ErrorDocument 404 /404.html

RewriteEngine On
RedirectMatch 301 ^/$ /apps/dashboard
RewriteCond %{DOCUMENT_ROOT}/maintenance_mode -f
RewriteCond %{REQUEST_FILENAME} !/sitedown.html
RewriteRule ^.*$    /sitedown.html [L]

Open in new window

0
I am trying to block a specified domain from my website, and haven't been successful.   The visits are coming from this URL:
best-seo-solution.com/try.php?u=http://mauivacationrental.com

mauivacationrental.com is one of my domains, and visitors are redirected to my other domain (www.mauitradewinds.com) using .htaccess.   The .htaccess which resides in the root folder of mauivacationrental.com is attached.  Please advise.

htaccess.txt
0
I am part way through bulding a website on a local webserver. I have used Ampps WAMP stack as my webserver.

I have managed to export the database from MySQL using MySQL workbench. I also have a copy of the contents of the www folder.

I now want to use these two items to setup the site on a new webserver.

I have not set up any version of WAMP (or LAMP) yet. I prefer Ampps as I am familiar with it but that isnt essential. I just want my sire back ! :)
0
Hey Guys -

After not using it for a while, I decided to set Subsonic back up on my home server today. I installed and configured it without issue and still even had 4040 forwarded in my router. I also host many other web-based apps & services on the server and therefore have Reverse Proxy via Apache set up and configured so that I may access each of them from a central address - plus - have them all under the HTTPS SSL cert I purchased for my domain name.

My Issue
I added Subsonic to the conf file as I did all my other services. When I test it, though, it doesn't work. When browsing to the new address via reverse proxy, I go to "https://mydomainname.com/subsonic" but fails. Instead, I get the 404 error: "Not Found - The requested URL /index. view was not found on this server." Also, in the address bar the address has changed from "https://mydomainname.com/subsonic" to "https://mydomainname.com/index.view"

Apache, Subsonic, and even my media are all installed on Windows 8.1 Update 1 x64 which is fully patched. I have Windows Firewall completely disabled as I manage all firewall configs directly on my router (OpenWRT.) I found a few resources online and tried different configurations, but they either didn't work or the Apache service wouldn't start after making the changes. Most resource I found online were for Linux installations, but most except paths should be the same I thought. Below are my two Apache conf files I use - httpd.conf & httpd-ssl.conf. All …
0
I wrote a PHP web application that is of course connected to MySQL database. Servers (Apache & PHP) are physically separated and protected by firewall. Between mentioned servers only communication through 3306 is possible while external users can access web application (server) only through internet using port 80 and 443. On the database server side, a schema ‘testprevozi’ has been created along with two data tables named ‘clan’ and ‘napacna_prijava’. There are also bunch of other data tables created here but are irrelevant for this discussion. Besides a general data stored in table ‘clan’ (name, username, address,…) the table contains very critical data of application users (username, password, application security settings…). And that table along with its general and critical data should remain hidden from anyone (except to a database user named ‘webupo’).

Mentioned PHP web application is of course using the table ‘user’ and it is one of the main data tables for application to run (user authentication and other procedures). Now, the question is how to ensure the maximum level of security of data table ‘user’ so there will be no theoretical and practical possibilies for unauthorized person through the internet using PHP web application to see or access the table data individually? The database user ‘webupo’ is only used for web application to communication with database and has the following rights (BTW: DELETE grant on …
0
Hi,
just wondering if there is a way to email then clear file /var/log/phpmail.log using PHP and cron?

Thanks in advance for your feedback.

In my php.ini file I have below
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; log all php mail scripts to check for spam ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
mail.log = /var/log/phpmail.log
0
I'm about to start working on a project where the code is hosted on a remote webserver (PHP).

To make sure the application will work on the production server we prefer to develop and test it as we go on a clone of the production environment. Meaning we'll be two-three developers all working on the same codebase hosted on the same server.

What's the best way of achieving this when we'll be multiple developers?
0
I have a development webserver with ten virtual hosts and drupal system.

when I put https:// before each namespace, all of them got forwarded to one specific instance instead of its own http:// version. Here is my httpd.conf setup file.
httpd.conf.txt
0
I am using a Apache HTTP server as a reverse proxy in front of Tomcat.
I want to restrict access to some files that are located in Apache.
Authorization needs to be done in Tomcat.
I can think of two different ways this could happen.
1:
A client sends a request for a file to Apache and Apache could ask Tomcat for authorization.
If Tomcat gives the ok, then Apache should send the file in the response.
Otherwise a 403 Forbidden HTTP status code is sent to client.
2:
A client sends a request for a file to Tomcat. If the client is authorized,
then Tomcat would ask Apache to send the file. Otherwise a 403 Forbidden HTTP status code is sent to client.

How do I accomplish one or the other?  

In my httpd.conf I have the following
ProxyRequests off
ProxyPreserveHost On
<Proxy *>
    Order deny,allow
    Allow from all
</Proxy>
ProxyPass /images !
ProxyPass / http://localhost:8080/
ProxyPassReverse /  http://localhost:8080/
<Location / >
    Order allow,deny
    Allow from all
</Location>   

Open in new window

The files are in the images directory(a subdirectory of Apache's document root).
Tomcat is listening on port 8080.
0
I've installed a Raspian/Debian webserver. It works fine when I browse to http://98.102.63.nnn/, but when I browse to https://98.102.63.nnn/ I get "This page can’t be displayed". I've used IP tables to forward port 443 to 80 and I have $DOCUMENT_ROOT/.htaccess set to:
RewriteEngine On
RewriteBase /
RewriteRule ^/?(.*)     http://%{SERVER_NAME}/index.html [L,R=301]

Open in new window

which may not be correct at all.

Could someone help me figure this out?
0
Looks like the majority of the space on our VM running Avaya is taken up by Logs from OneXPortal, under tomcat/apache-tomcat-6.0.18/logs.

The logs are basically all 1xOverallRollingFile-(date) and 1XPresentationLayerRollingFile(date), and I was wondering if there is a way that I can delete these manually, and/or enable a way of having these deleted after a certain time period (ie; only the current month kept).
Several Hundred Megabytes are eaten per day by these logs.

Anyone with any experience in this particular issue, please let me know your thoughts. Thank you Experts!
0
I am using the Bitnami WAMP and have tested the connection to a db with a small program.  It worked fine.  I load up a more complex program and I get the

mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES)

I have a screenshot showing that the privileges for all users is yes. The only difference between the two is that I am using this for the connection

DEFINE ('DB_USER', 'root');
DEFINE ('DB_PASSWORD', '#######');
DEFINE ('DB_HOST', 'localhost');
DEFINE ('DB_NAME', 'ecommerce');

// Make the connection:
$dbc = mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);

// Set the character set:
mysqli_set_charset($dbc, 'utf8');
error
0
I'm working with VPS running CentOS, Plesk and NGINX.  The system is under typical load at the moment and I can see the swap space (512MB) is showing 424.34 MB used.  Memory usage is at 38% (1GB total)

What is the purpose of the swap space, and is the relationship to performance? (I'm reading about it online but I'm looking for experts comments about real world swap use)
At what point should I consider increasing it?
0
Hi,
I have a PHP script that changes permissions on a file, writes to it and then changes permissions back.

But I am getting the following error?

Is there something I need to change in WHM or php.ini file to allow chmod?

Thanks,

Andrew

chmod($file, 0777); //change permissions to allow write
chmod($file, 0644); //change permissions of back after update




Warning: chmod() [function.chmod]: Operation not permitted in /home/mywebsite/public_html/admin/website_settings.php on line 12

Warning: chmod() [function.chmod]: Operation not permitted in /home/mywebsite/public_html/admin/website_settings.php on line 38

Warning: Cannot modify header information - headers already sent by (output started at /home/mywebsite/public_html/admin/website_settings.php:12) in /home/mywebsite/public_html/admin/website_settings.php on line 388
0
Hi,
I am trying to work out the best way to redirect several domain names to a particular page on a website?

I was thinking of just parking all domain names in cPanel under mywebsite.com.au and the setting up redirection using .htaccess?

If this would work how would I code the following redirects in .htaccess file?


www.my_domain_name.com.au 
redirect to
www.mywebsite.com.au/index.php?page_id=214

www.anotherwebsite.com.au 
redirect to
www.mywebsite.com.au/index.php?page_id=13

www.my_otherdomain_name.com.au 
redirect to
www.mywebsite.com.au/index.php?page_id=66


Thanks
0
Hi All,

We are planning to utilize Apace Solr (sunspot) for our website built using ruby on rails. We already have Solr setup and working using the sunspot Solr gem for rails.

When we first implemented Solr our assumption was that all indexing and data would pull from Solr, but obviously that's not the case. Solr is intended to be an index server not a database. With that said, there is an option to store data in Solr so the data pulled will come from the Solr server and not the DB direct. I've read various articles that say its ok to store the data on Solr as well as index.

The main reasons we decided to use Solr were to improve search speed, take some load of the database and for the faceted search capability that Solr offers.

We are a bit confused as to what the best practice would be to achieve these goals, more specifically to gain performance.

Should we:

1. store all needed fields displayed in the search results in Solr?
2. Use a combination of both (some stored data from Solr and other data from the DB)?
3. Only use Solr for indexing and pull all data from the DB?

Some additional info. Our database of product for our web search has been denormalized. This DB is specifically for read only purposes on the website. Total rows a little over 380,000. We are on rails 4.2, Ruby 2.2. MySQL Version 5.5.41 so we are pretty current on the software side.
0

Apache Web Server

20K

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.