| 
 
 
 | 
| Keep Server Online 
 If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
 
 or
 
 
   
 A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
 
 Thank You! Steffen
 
 Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
 |  | 
 | 
| | 
| | 
|  Topic: Apache 2.4 and .htaccess |  |  
| Author |  |  
| bubbawny 
 
 
 Joined: 17 Mar 2015
 Posts: 2
 Location: usa, buffalo
 
 | 
|  Posted: Tue 17 Mar '15 18:55    Post subject: Apache 2.4 and .htaccess |   |  
| 
 |  
| Hi friends! 
 I'm new here and new to Linux. I've got many years of development of LAMP applications and .Net applications. I'm relatively unskilled on Linux management. So I put up my own SUSE 13.2 box and I'm trying to learn how to manage it myself. I've got MySQL installed, apache, Webmin, phpMyAdmin, and two wordpress sites on separate virtual hosts.
 
 One of the issues I'm having is with enabling .htaccess on one of the sites.
 
 This is my vhost.d configuration:
 
 <VirtualHost *:80>
 DocumentRoot /srv/www/htdocs
 <Directory /srv/www/htdocs>
 allow from all
 Options None
 </Directory>
 ServerName test.mysite.com
 </VirtualHost>
 
 <VirtualHost *:80>
 DocumentRoot /srv/www/htdocs2
 <directory /srv/www/htdocs2>
 DirectoryIndex disabled
 Options Indexes
 Allowoverride All
 Require all granted
 </Directory>
 ServerName www.mysite.com
 </VirtualHost>
 
 
 both sites go to working installs of Wordpress 4.x. However, I'm tracking down WP4 problem when enabling the use of POST NAMES instead of DEFAULT. Apparently, .htaccess needs to be enabled and Wordpress will create a proper .htaccess file.
 
 I enabled mod_rewrite for my Apache 2.4.10 site. As you can see from my vhosts.d site, I believe I've configured it for use with .htaccess files
 
 When I visit that second site, I get a 403 forbidden. If I put in www.mysite.com/.htaccess, i get a denied. If I put in www.mysite.com/index.php, i get a 403 forbidden.
 
 I just can't figure this out. I've created a .htaccess file, used CHMOD 755 on it, set the wwwuser to be the user on the file. (the htdocs2 folder is also set up for wwwuer. Wordpress actually created a .htaccess file. but it's not going in effect.
 
 I've tried researching how to configure this in apache 2.4, but alot of the google sites refer to earliar versions.
 
 Suffice it to say, I'm kindly asking for some help in figuring out how to enable use of mod_rewrite and .htaccess files.
 
 It's driving me crazy, but then again I am an admitted noob to OpenSuse 13.2 and Linux in general.
 
 (I'm proud of myself for getting two sites installed and configured with virtual hosts/host header support. It's been going pretty well except for this troublesome issue.)
 
 Thank you in advance for your help. I'm grateful.
 |  |  
| Back to top |  |  
| bubbawny 
 
 
 Joined: 17 Mar 2015
 Posts: 2
 Location: usa, buffalo
 
 | 
|  Posted: Tue 17 Mar '15 19:56    Post subject: |   |  
| 
 |  
| NVM. Figured it out. 
 <VirtualHost *:80>
 DocumentRoot /srv/www.htdocs2
 <directory /srv/www.htdocs>
 Options FollowSymlinks Indexes
 DirectoryIndex index.php index.html
 AllowOverride All
 Require all granted
 </Directory>
 ServerName www.mysite.com
 </VirtualHost>
 |  |  
| Back to top |  |  
 
 | 
 |  | 
 |  |