Posted by arunkmarcse on December 16, 2012 at 4:55pm
I'm new to drupal. I have a dedicated VPS. I followed the given steps of drupal documentation. It is successfully installed without any issue.
It is installed in the directory /var/www/openpublish.
I tried to call my website by typing by domain Name as www.articlegoes.com. It returns only the apache default server page. But, if i go to www.articlegoes.com/openpublish , it is going to the website without any problem. I have also activated mod-rewrite by using sudo a2enmod rewrite.
I browsed a lot on how to point my domain name to the subdirectory, but, i could not find any clear solution. It would be great if somebody help me with the solution for this problem???
Comments
Name based virtual hosts
I suspect you need to specify a virtual host. Here's some info for Apache2
In a nutshell create a new file named
www.articlegoes.comin /etc/apache2/sites-available/ with your virtual host configuration. Then link it to /etc/apache2/sites-enabled/ and restart Apache.Here's a modified example from my localhost:
<VirtualHost *:80>
ServerAdmin you@yourmail.com
ServerName your name
DocumentRoot /var/www/openpublish
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/openpublish/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
AccessFileName .htaccess
</VirtualHost>
ps. To create the link I mentioned above:
ln -s /etc/apache2/sites/available/www.articlegoes.com /etc/apache2/sites-enabled/--BitRadiator
Hi, I followed your steps..
Hi,
I followed your steps.. But, while restarting apache, i got the following error,
root@articlegoes:/etc/apache2/sites-available# sudo /etc/init.d/apache2 restart
apache2: Syntax error on line 237 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/sites-enabled/www.articlegoes.com: No such file or directory
Action 'configtest' failed.
The Apache error log may have more information.
...fail!
Can you give any suggestion on this??
Try a2ensite instead maybe?
If you are logged in as root there is no need to use sudo.
Can you provide a directory listing of sites-available and sites-enabled? Use ls -l to display file details.
What showed up in your Apache error log?
--BitRadiator
Deleted 000-default in Sites-enabled.. Now, its working..
Hi,
I have fixed my problem..The mistake i did was, I didn't noticed that the following command has / instead of -
ln -s /etc/apache2/
sites/available/www.articlegoes.com /etc/apache2/sites-enabled/Then, i changed it and the apache restarted successfully.
Then, in sites-enabled directory, two files were there, www.articleback.com and 000-default. I just deleted 000-default. Now, its working really fine..
But, in the browser if i give www.articleback.com, its going fine... But, if i give just articleback.com, its not going.. Do, i need to add anything else to make it work... Does it Matter or i leave it??
Thank you so much for your help:::)))
Did you read the Apache docs?
I spotted another mistake in my first post. :(
This:
ServerName your nameshould actually be more likethis:
ServerName www.articleback.comTo allow access with & without the www add an alias to the vhost file.
ServerAlias articleback.comThen you may also tweak the rewrite rules in your sites .htaccess file to only use one or the other.
It's probably not a good idea to delete the 000-default vhost file as there may be some important config options in there. Specifying the location for Apache's logs is one that I can think of off the top of my head. ;)
Happy to be of assistance.
--BitRadiator
Works Fine Now
I have fixed out what are the things need to be done and the site is working fine for me..
I tried to Install Themes in my site.. So, using Modules, I tried to import a link of the themes but i was getting the following ftp error,
Warning: ftp_login(): Login incorrect. in FileTransferFTPExtension->connect() (line 59 of /var/www/openpublish/includes/filetransfer/ftp.inc).
Failed to connect to the server. The server reports the following message:
Cannot log in to FTP server. Check username and password
For more help installing or updating code on your server, see the handbook.
Can You just tell me, whats the issue i'm facing here.. It would be great if you can help me..
FTP :( Drush ftw
To use the Drupal interface to d/l modules & themes you must have FTP installed & properly configured on your server. I can't help with that (I never touch FTP) but if you learn about Drush you'll never have to either. Drush is definitely the way to go. Did I mention how cool Drush is?
--BitRadiator
Ok That's cool.. I will have
Ok That's cool.. I will have a look at it...Thanks