I have used virtualhost file in drupal to create multiple sites under one server. Also to remove /drupal from the url.
ex: 202.45.198.98/drupal this is how my URL looks like when ever I visit my website
After creating new Virtual host file for my website, I can see my website without /drupal in url.
Now the problem only the first page is loaded I mean some matter but not images, drupal template or any other links.
<VirtualHost *:80>
ServerAdmin webmaster#localhost
ServerName mysite
DocumentRoot /var/www/drupal
<Directory /var/www/drupal/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
<Directory /var/www/drupal/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin/">
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order deny,allow
Allow from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
You should check the settings.php inside sites/default folder. You will see a line something like --
# $base_url = 'http://www.example.com'; // NO trailing slash!
Remove the hash at the start & update the URL with the current URL you have for the drupal instance. Most probably you will solve your problem if your connection setting is correct at the same settings.php file (DB name, server name, username & password).
If you find problem due to clean URL in logging in then you may have to put manual path for logging in as admin, which will be --
YOUR_BASE_URL/?q=user/login
If you want to disable clean URL then you can write a extra line in your settings.php --
$conf = array(
'clean_url' => 0,
);
Have nice drupling :)
Related
I manage 3 websites on one server instance. I set the Bitnami.conf like below
<VirtualHost *:80>
ServerName morethanair.com
ServerAlias morethanair.com
DocumentRoot "/opt/bitnami/apps/wordpress/htdocs"
<Directory "/opt/bitnami/apps/wordpress/htdocs">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
Require all granted
</Directory>
# Bitnami applications installed with a prefix URL (default)
Include "/opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf"
</VirtualHost>
<VirtualHost *:80>
ServerName microblog.morethanair.com
DocumentRoot "/opt/bitnami/apps/wordpress/microblog-wordpress/"
<Directory "/opt/bitnami/apps/wordpress/microblog-wordpress/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
Require all granted
</Directory>
# Bitnami applications installed with a prefix URL (default)
Include "/opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf"
</VirtualHost>
<VirtualHost *:80>
ServerName photo.morethanair.com
DocumentRoot "/opt/bitnami/apps/wordpress/photo-wordpress/"
<Directory "/opt/bitnami/apps/wordpress/photo-wordpress/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
Require all granted
</Directory>
# Bitnami applications installed with a prefix URL (default)
Include "/opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf"
</VirtualHost>
I can connect 2 sites with subdomain (photo.morethanair.com and microblog.morethanair.com), but the server error occurred when I try to connect morethanair.com.
When I type 'morethanair.com' in the browser, the URL changes to 'morethanair.com//' with double slash.
Any idea to resolve this?
I already tried to delete Wordpress and all plug-ins and reinstalled the latest Wordpress, but it didn't work.
Thank you.
I'm trying to make my apache visible on my local network for being able to acces my wordpress site hosted there, by editing httpd.conf file on /bin/apache/conf/ and im getting a Permision Error, but I can't find any clear content on the Internet.
Im using UWAMP 3.1.0 and It must be something related with this part of the code:
<VirtualHost *:80>
#UWAMP Generate Virtual Host
DocumentRoot "F:/UwAmp/www/"
ServerName "main-serveur"
Alias "/mysql/" "F:/UwAmp/phpapps/phpmyadmin/"
Alias "/mysql" "F:/UwAmp/phpapps/phpmyadmin/"
Alias "/uwamp/" "F:/UwAmp/phpapps/uwamp/"
Alias "/uwamp" "F:/UwAmp/phpapps/uwamp/"
<Directory "F:/UwAmp/phpapps/phpmyadmin/">
AllowOverride All
Options FollowSymLinks Includes Indexes
Require local
</Directory>
<Directory "F:/UwAmp/phpapps/uwamp/">
AllowOverride All
Options FollowSymLinks Includes Indexes
Require local
</Directory>
<Directory "F:/UwAmp/www/">
AllowOverride All
Options FollowSymLinks Indexes
Require local
</Directory>
more concretely at the end:
<Directory "F:/UwAmp/www/">
AllowOverride All
Options FollowSymLinks Indexes
Require local
</Directory>
This is what I get after entering the IP where the site is hosted.
sorry for asking something so simple but I'm learning
Thank you in advance
{ONLINE_MODE}
If UwAmp is on Online mode, your website is available for all.
{ONLINE_MODE} will be replaced by :
Order allow,deny
Allow from all
If UwAmp is on Offline mode, your website is available only for your computer.
{ONLINE_MODE} will be replaced by :
Order deny,allow
Allow from 127.0.0.1 localhost
I'm migrating to other server, and in the new server I got this error, the path to all css files are wrong, the js paths are fine, everything else is fine.
Path magento return through getCssJsHtml():
/var/www/domain.com/public/http://domain.com/public/skin/frontend/fortis/default/css/style.css
The path that getSkinUrl() function returns is correct.
Changed the base_url (secure and unsecure) to the new one.
merge_files are 0
cleaned the cache (rm -rf * in var/).
Tried to change ownership of media and var folders to www-data, didn't work as well.
I'm using Fortis theme.
I have GTSpeed extension installed, if I disable it, the head tag shows empty.
If I enable css and js compression in GTSpeed I get a 400 Bad request error.
The admin section always works fine, only thing I noticed is if I change the Link Base Url in Configuration >> Web, I got an 404 error when saving. But I can change all other fields and it saves as expected.
The vhost configuration:
<VirtualHost *:80>
ServerAdmin webmaster#localhost
<Directory "/var/www/domain.com/public">
Options All
AllowOverride All
Order allow, deny
Allow from all
</Directory>
RewriteEngine on
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Check what your secure and unsecure urls have trailing slash: http://domain.com/
The same for skin, js, css paths: {{unsecure_base_url}}skin/
After that check your .htaccess file, especially RewriteEngine and RewriteBase params. In most cases next values working fine:
Options All
RewriteEngine on
RewriteBase /
If you use Apache vhosts, check vhost config. In VirtualHost section you need next lines:
<VirtualHost>
...
<Directory "/var/www/domain.com/public">
Options All
AllowOverride All
Order allow,deny
Allow from all
</Directory>
RewriteEngine On
...
</VirtualHost>
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I'm trying to install wordpress in a Cloud Server with rackspace.
But my lack of knowledge in server configuration (LAMP , etc) is making me do a lot of miss configurations .
First I think the .httaccess is not allow.
Second the update Wordpress and plugins featured is not allow
Third may be more numbers...
let me show my virtualhost file:
<VirtualHost *:80>
# Admin email, Server Name (domain name) and any aliases
ServerAdmin adrian#my.com
ServerName my.com
ServerAlias www.my.com
# Index file and Document Root (where the public files are located)
DirectoryIndex index.html, index.php
DocumentRoot /home/devdreams/domains/my.com/public
# Custom log file locations
LogLevel warn
ErrorLog /home/devdreams/domains/my.com/log/error.log
CustomLog /home/devdreams/domains/my.com/log/access.log combined
<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
Satisfy all
</Directory>
AccessFileName .htaccess
<Directory /home/devdreams/domains/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
LoadModule rewrite_module modules/mod_rewrite.so
</VirtualHost>
Could somebody help me configure my VH for a wordpress environment
thaaks
Your .htaccess will not work because you have AllowOverride None, change that to AllowOverride All
In terms of being able to update Wordpress and the plugins you will need to change the ownership of the files/directories to the user that is running the webserver. For example: chown -R apache:apache /home/devdreams/domains/
I'm having problems with setting up my apache2 server in Ubuntu.
I did a sudo apt-get install and it installed normally. I was able to see that the site was working when accessing localhost.
Then I'm not sure what happened, but I am no longer able to see the "It works!" website. When I try to restart apache2, it returns this:
Syntax error on line 17 of /etc/apache2/sites-enabled/000-default:
AddHandler requires at least two arguments, a handler name followed by one or more file extensions
Action 'configtest' failed.
The Apache error log may have more information.
...fail!
Any ideas?
Here is my /etc/apache2/sites-enabled/000-default:
ServerAdmin webmaster#localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
DirectoryIndex index.html index.py
AddHandler mod_python.py
PythonHandler mod_python.publisher
PythonDebug On
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
There is a problem on your config file. Try changing the line 14 by :
AddHandler mod_python .py